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/fhandler_tty.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/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 56ef28020..4ef3457e8 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1614,10 +1614,9 @@ extern "C" BOOL WINAPI GetNamedPipeClientProcessId (HANDLE, PULONG); OSes there's no function to check for the PID of the client process so we have to trust the client side. - Since there's - always only one pipe instance, there's a chance that clients have to - wait to connect to the master control pipe. Therefore the client calls - to CallNamedPipe should have a big enough timeout value. For now this + Since there's always only one pipe instance, there's a chance that clients + have to wait to connect to the master control pipe. Therefore the client + calls to CallNamedPipe should have a big enough timeout value. For now this is 500ms. Hope that's enough. */ DWORD @@ -1635,7 +1634,7 @@ fhandler_pty_master::pty_master_thread () DWORD pid; termios_printf ("Entered"); - while (!exit && ConnectNamedPipe (master_ctl, NULL)) + while (!exit && (ConnectNamedPipe (master_ctl, NULL) || GetLastError () == ERROR_PIPE_CONNECTED)) { pipe_reply repl = { NULL, NULL, 0 }; bool deimp = false; |