* Makefile.in (new-cygwin1.dll): Reorganize library order.

* dcrt0.cc (do_exit): Move thread stuff after vfork stuff or threads are
terminated during vfork.
* sigproc.cc (proc_terminate): Grab proc lock prior to signalling subproc
thread exit to avoid an extra "wait-for-thread-to-exit".
This commit is contained in:
Christopher Faylor
2002-10-10 05:23:23 +00:00
parent c4ec64d76b
commit 2a3bf3e2ce
4 changed files with 24 additions and 15 deletions

View File

@@ -959,6 +959,12 @@ do_exit (int status)
UINT n = (UINT) status;
static int NO_COPY exit_state = 0;
syscall_printf ("do_exit (%d)", n);
vfork_save *vf = vfork_storage.val ();
if (vf != NULL && vf->pid < 0)
vf->restore_exit (status);
if (!DisableThreadLibraryCalls (cygwin_hmodule))
system_printf ("DisableThreadLibraryCalls (%p) failed, %E",
cygwin_hmodule);
@@ -969,12 +975,6 @@ do_exit (int status)
cygthread::terminate ();
}
syscall_printf ("do_exit (%d)", n);
vfork_save *vf = vfork_storage.val ();
if (vf != NULL && vf->pid < 0)
vf->restore_exit (status);
if (exit_state < ES_SIGNAL)
{
exit_state = ES_SIGNAL;