diff options
author | Christopher Faylor <me@cgf.cx> | 2003-06-07 15:12:23 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-06-07 15:12:23 +0000 |
commit | 9501a0a1c74742fc238203ee92d8ac8c79e1e645 (patch) | |
tree | d610164ece88a08596521bdc726b26993af98244 | |
parent | f496071c4072d8c3db27ce51a0a3e13729b7be4c (diff) | |
download | cygnal-9501a0a1c74742fc238203ee92d8ac8c79e1e645.tar.gz cygnal-9501a0a1c74742fc238203ee92d8ac8c79e1e645.tar.bz2 cygnal-9501a0a1c74742fc238203ee92d8ac8c79e1e645.zip |
* fhandler_tty.cc (fhandler_tty_slave::close): Free the console when last tty
closes.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 94ec37845..2c146ab96 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-06-07 Christopher Faylor <cgf@redhat.com> + + * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when + last tty closes. + 2003-06-07 Thomas Pfaff <tpfaff@gmx.net> * fhandler_socket.cc (fhandler_socket::connect): Change error diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 6285b24bd..6409090e9 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -583,7 +583,8 @@ fhandler_tty_slave::close () { if (!output_done_event) { - fhandler_console::open_fhs--; + if (!--fhandler_console::open_fhs && myself->ctty == -1) + FreeConsole (); termios_printf ("decremented open_fhs %d", fhandler_console::open_fhs); } return fhandler_tty_common::close (); |