* cygthread.cc (cygthread::stub): Reintroduce clearing of __name but do it
before SetEvent to eliminate a race. (cygthread::terminate): Accumulate list of threads to check for termination and call WaitForMultipleObjects on list rather than waiting for each thread individually. * sigproc.cc (subproc_init): Zap hwait_subproc thread handle since it is no longer used. * spawn.cc (spawn_guts): Fix so that cygthread::terminate is *really* called only for exec.
This commit is contained in:
@@ -715,8 +715,10 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
||||
cygheap->fdtab.fixup_before_exec (pi.dwProcessId);
|
||||
cygheap_setup_for_child_cleanup (newheap, &ciresrv, 1);
|
||||
if (mode == _P_OVERLAY)
|
||||
ResumeThread (pi.hThread);
|
||||
cygthread::terminate ();
|
||||
{
|
||||
ResumeThread (pi.hThread);
|
||||
cygthread::terminate ();
|
||||
}
|
||||
}
|
||||
|
||||
if (mode != _P_OVERLAY)
|
||||
|
Reference in New Issue
Block a user