* 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:
Christopher Faylor
2002-10-14 03:51:44 +00:00
parent a7a5d0ba37
commit 969203ce91
4 changed files with 31 additions and 8 deletions

View File

@@ -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)