From 969203ce911a958c9b41ab934334c48bd15df7e0 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 14 Oct 2002 03:51:44 +0000 Subject: * 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. --- winsup/cygwin/spawn.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index b3bf304fb..6bc76fba3 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -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) -- cgit v1.2.3