diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 647f145..bc27f95 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -166,6 +166,7 @@ set_console_state_for_spawn () &sec_none_nih, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + debug_printf ("h %p", h); if (h == INVALID_HANDLE_VALUE) return 0; @@ -648,8 +649,12 @@ fhandler_console::close (void) set_io_handle (NULL); set_output_handle (NULL); if (!cygheap->fdtab.in_vfork_cleanup () && --open_fhs <= 0 - && myself->ctty != FH_CONSOLE) - FreeConsole (); + && myself->ctty != TTY_CONSOLE) + { + syscall_printf ("open_fhs %d, freeing console %p", + fhandler_console::open_fhs, myself->ctty); + FreeConsole (); + } debug_printf ("decremented open_fhs, now %d", open_fhs); return 0; } |