diff options
author | Christopher Faylor <me@cgf.cx> | 2005-06-07 18:41:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-06-07 18:41:31 +0000 |
commit | b739751db982170d8e10caa720e5c6a5a1918f37 (patch) | |
tree | 42c773457d8aeecd5fd6a06e076da04410f0d38b /winsup/cygwin/dcrt0.cc | |
parent | 7066fc51d74c0a9e3b85350617e889db92816d59 (diff) | |
download | cygnal-b739751db982170d8e10caa720e5c6a5a1918f37.tar.gz cygnal-b739751db982170d8e10caa720e5c6a5a1918f37.tar.bz2 cygnal-b739751db982170d8e10caa720e5c6a5a1918f37.zip |
* cygthread.cc (cygthread::detach): Make error message a little more detailed.
* fhandler.cc (fhandler_base::raw_read): Ditto for debug message.
* dcrt0.cc (do_exit): Add some more synchronization tests.
* fhandler_fifo.cc (fhandler_fifo::dup): Don't duplicate a nonexistent handle.
Use derived return value rather than always retuning 0.
* fhandler_netdrive.cc (fhandler_netdrive::exists): Wnet -> WNet.
* winsup.h (exit_states): Add a couple of new exit states.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 457661000..ea0edbd0c 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -1013,8 +1013,18 @@ do_exit (int status) #endif EnterCriticalSection (&exit_lock); - muto::set_exiting_thread (); - dll_global_dtors (); + + if (exit_state < ES_SET_MUTO) + { + exit_state = ES_SET_MUTO; + muto::set_exiting_thread (); + } + + if (exit_state < ES_GLOBAL_DTORS) + { + exit_state = ES_GLOBAL_DTORS; + dll_global_dtors (); + } if (exit_state < ES_EVENTS_TERMINATE) { |