* 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.
This commit is contained in:
Christopher Faylor
2002-08-02 02:10:24 +00:00
parent 8a19897f17
commit 6b2a9a2fdf
7 changed files with 46 additions and 20 deletions

View File

@ -921,12 +921,13 @@ class fhandler_pty_master: public fhandler_tty_common
bool hit_eof ();
};
class cygthread;
class fhandler_tty_master: public fhandler_pty_master
{
public:
/* Constructor */
fhandler_console *console; // device handler to perform real i/o.
HANDLE hThread; // process_output thread handle.
cygthread *output_thread; // process_output thread
fhandler_tty_master (int unit);
int init (int);