summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 268c34f46..1a77c360f 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -98,10 +98,7 @@ close_all_files (void)
}
if (cygheap->ctty.get_io_handle ())
- {
- myself->ctty = -1;
- cygheap->ctty.close ();
- }
+ cygheap->ctty.fhandler_tty_common::close ();
ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "close_all_files");
user_shared->delqueue.process_queue ();
@@ -324,10 +321,7 @@ setsid (void)
myself->sid = getpid ();
myself->pgid = getpid ();
if (cygheap->ctty.get_io_handle ())
- {
- cygheap->ctty.close ();
- cygheap->ctty.set_io_handle (NULL);
- }
+ cygheap->ctty.fhandler_tty_common::close ();
syscall_printf ("sid %d, pgid %d, ctty %d, open_fhs %d", myself->sid,
myself->pgid, myself->ctty, fhandler_console::open_fhs);
return myself->sid;