Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 8bf74d5ae..47d6b10de 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -104,6 +104,7 @@ close_all_files (void)
{
debug_printf ("closing ctty");
cygheap->ctty->close ();
+ cygheap->ctty = NULL;
}
ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "close_all_files");
@@ -320,7 +321,7 @@ setsid (void)
syscall_printf ("hmm. pgid %d pid %d", myself->pgid, myself->pid);
else
{
- if (myself->ctty >= 0 && fhandler_console::open_fhs <= 0)
+ if (myself->ctty >= 0 && cygheap->open_fhs <= 0)
{
syscall_printf ("freeing console");
FreeConsole ();
@@ -329,7 +330,7 @@ setsid (void)
myself->sid = getpid ();
myself->pgid = getpid ();
syscall_printf ("sid %d, pgid %d, ctty %d, open_fhs %d", myself->sid,
- myself->pgid, myself->ctty, fhandler_console::open_fhs);
+ myself->pgid, myself->ctty, cygheap->open_fhs);
if (cygheap->ctty)
{
cygheap->ctty->close ();