diff options
author | Christopher Faylor <me@cgf.cx> | 2002-08-02 02:10:24 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-08-02 02:10:24 +0000 |
commit | 6b2a9a2fdf2a62475c7bb7ff3ef49eee5b82fa6e (patch) | |
tree | 11e02150f990347628c418296d1344740b7ac689 /winsup/cygwin/tty.cc | |
parent | 8a19897f17594f47d2c4cc78bae466e9c54dc1e1 (diff) | |
download | newlib-6b2a9a2fdf2a62475c7bb7ff3ef49eee5b82fa6e.zip newlib-6b2a9a2fdf2a62475c7bb7ff3ef49eee5b82fa6e.tar.gz newlib-6b2a9a2fdf2a62475c7bb7ff3ef49eee5b82fa6e.tar.bz2 |
* cygthread.cc (cygthread::exit_thread): Define new method.
* cygthread.h (cygthread::exit_thread): Declare new method.
* fhandler.h (fhandler_tty_master::hThread): Delete.
(fhandler_tty_master::output_thread): Define.
* fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Adjust
constructor.
(fhandler_tty_master::init): Use cygthread rather than handle.
(process_output): Use cygthread method to exit.
(fhandler_tty_master::fixup_after_fork): Set output_thread to NULL after fork.
(fhandler_tty_master::fixup_after_exec): Set output_thread to NULL after
spawn/exec.
* tty.cc (tty_list::terminate): Detach from output_thread using cygthread
method.
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r-- | winsup/cygwin/tty.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 11c25b1..bb9f840 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]; |