summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/tty.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r--winsup/cygwin/tty.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index 11c25b161..bb9f8409f 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -25,6 +25,7 @@ details. */
#include "cygwin/cygserver_transport.h"
#include "cygwin/cygserver.h"
#include "shared_info.h"
+#include "cygthread.h"
extern fhandler_tty_master *tty_master;
@@ -144,8 +145,8 @@ tty_list::terminate (void)
ForceCloseHandle1 (t->to_slave, to_pty);
ForceCloseHandle1 (t->from_slave, from_pty);
CloseHandle (tty_master->inuse);
- // FIXME This should be using a cygthread object
- WaitForSingleObject (tty_master->hThread, INFINITE);
+ if (tty_master->output_thread)
+ tty_master->output_thread->detach ();
t->init ();
char buf[20];