diff options
author | Christopher Faylor <me@cgf.cx> | 2010-10-24 22:50:57 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-10-24 22:50:57 +0400 |
commit | 5160c5f4303773e03d599342e696fa3c349f9f05 (patch) | |
tree | 8c727ed933a531195b66ca5f6bd283d8f36505f3 /winsup/cygwin/dcrt0.cc | |
parent | 488ddaced31b6e5c022732588375ddf6281b1c1a (diff) |
* dcrt0.cc (do_exit): Don't set thread termination until all fds have been
closed since an fd may rely on a thread.
* fhandler_tty.cc: Reformat comment.
(fhandler_pty_master::pty_master_thread): Refuse ERROR_PIPE_CONNECTED state as
an error.
* globals.cc (exit_states): Reorder ES_THREADTERM.
* path.cc (find_fast_cwd_pointers): Remove excessively wordy DEBUGGING output.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 13dc33d17..4aca47495 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -1054,13 +1054,6 @@ do_exit (int status) events_terminate (); } - UINT n = (UINT) status; - if (exit_state < ES_THREADTERM) - { - exit_state = ES_THREADTERM; - cygthread::terminate (); - } - if (exit_state < ES_SIGNAL) { exit_state = ES_SIGNAL; @@ -1076,6 +1069,13 @@ do_exit (int status) close_all_files (); } + UINT n = (UINT) status; + if (exit_state < ES_THREADTERM) + { + exit_state = ES_THREADTERM; + cygthread::terminate (); + } + myself->stopsig = 0; if (exit_state < ES_HUP_PGRP) |