* fhandler_console.cc (fhandler_console::close): Don't decrement in use counter

if in vfork fixup stage.
This commit is contained in:
Christopher Faylor 2003-03-03 03:58:10 +00:00
parent f5eb407ed1
commit d5d2ffee38
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-02 Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (fhandler_console::close): Don't decrement
in use counter if in vfork fixup stage.
2003-03-02 Christopher Faylor <cgf@redhat.com>
* lib/getopt.c: Nuke use of unneeded BSDisms.

View File

@ -647,7 +647,8 @@ fhandler_console::close (void)
CloseHandle (get_output_handle ());
set_io_handle (NULL);
set_output_handle (NULL);
if (--open_fhs <= 0 && myself->ctty != FH_CONSOLE)
if (!cygheap->fdtab.in_vfork_cleanup () && --open_fhs <= 0
&& myself->ctty != FH_CONSOLE)
FreeConsole ();
debug_printf ("decremented open_fhs, now %d", open_fhs);
return 0;