* 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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user