summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-12-08 06:27:05 +0000
committerChristopher Faylor <me@cgf.cx>2003-12-08 06:27:05 +0000
commitda915a3aa6868a0815616ff4ba7904081968de23 (patch)
tree201a8d77e87c0102c994d264f492e87b1e65efaf /winsup/cygwin/syscalls.cc
parent1b11f4fd72fd34daa11edbd6bed62547c8d2dfda (diff)
downloadcygnal-da915a3aa6868a0815616ff4ba7904081968de23.tar.gz
cygnal-da915a3aa6868a0815616ff4ba7904081968de23.tar.bz2
cygnal-da915a3aa6868a0815616ff4ba7904081968de23.zip
* fhandler.h (fhandler_tty_slave::ttyname): Use name from pc since it is
guaranteed to be accurate. * fhandler_tty.cc (fhandler_tty_slave::open): Increment open_fhs appropriate when copying ctty. (fhandler_tty_slave::close): Remove special case handling for exit_state. Use ctty < 0 check instead. (fhandler_tty_common::close): Set io_handle to NULL after closing. * syscalls.cc (close_all_files): Specifically close cygheap->ctty, if appropriate.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index c857ed487..268c34f46 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -97,6 +97,12 @@ close_all_files (void)
cygheap->fdtab.release (i);
}
+ if (cygheap->ctty.get_io_handle ())
+ {
+ myself->ctty = -1;
+ cygheap->ctty.close ();
+ }
+
ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "close_all_files");
user_shared->delqueue.process_queue ();
}