Cygwin: drop PROC_DETACHED_CHILD flag
pinfo::remember with the detach parameter set to true is the only way to call proc_subproc with PROC_DETACHED_CHILD. This call is exclusively used in spawn to set up a pinfo for a detached child, and that pinfo goes out of scope right afterwards without any further action. Drop the flag and drop the detach parameter from pinfo::remember. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -867,9 +867,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
|
||||
child->start_time = time (NULL); /* Register child's starting time. */
|
||||
child->nice = myself->nice;
|
||||
postfork (child);
|
||||
if (mode == _P_DETACH
|
||||
? !child.remember (true)
|
||||
: !(child.remember (false) && child.attach ()))
|
||||
if (mode != _P_DETACH
|
||||
&& (!child.remember () || !child.attach ()))
|
||||
{
|
||||
/* FIXME: Child in strange state now */
|
||||
CloseHandle (pi.hProcess);
|
||||
|
Reference in New Issue
Block a user