summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-10-10 05:23:23 +0000
committerChristopher Faylor <me@cgf.cx>2002-10-10 05:23:23 +0000
commit2a3bf3e2cee2ddce5d6f6951d948a307260015e8 (patch)
treec3e307f111eff877f7af4852813f85289245c36e /winsup/cygwin/dcrt0.cc
parentc4ec64d76b9650b92d4c9f566fbac788c2d3fd46 (diff)
downloadcygnal-2a3bf3e2cee2ddce5d6f6951d948a307260015e8.tar.gz
cygnal-2a3bf3e2cee2ddce5d6f6951d948a307260015e8.tar.bz2
cygnal-2a3bf3e2cee2ddce5d6f6951d948a307260015e8.zip
* 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".
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 2959c6f08..f55b26d22 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -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;