From 8b19b43d001f7c842147b366211a25edea7cbf1f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 2 Mar 2003 18:37:17 +0000 Subject: * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary if LoadLibraryEx fails. * dtable.cc (dtable::dec_console_fds): Eliminate. (dtable::release): Don't treat console specially. (dtable::build_fhandler): Ditto. * dtable.h (console_fds): Eliminate. (dtable::dec_console_fds): Eliminate. (dtable::inc_console_fds): Eliminate. * fhandler.h (fhandler_console::open_fhs): New static element. * fhandler_console.cc (fhandler_console::open): Increment open_fs. (fhandler_console::close): Call FreeConsole if no more open consoles and ctty is not associated with the console. * syscalls.cc (setsid): Simplify check for when to call FreeConsole. (check_pty_fds): Eliminate definition. * winsup.h (check_pty_fds): Eliminate declaration. --- winsup/cygwin/dtable.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'winsup/cygwin/dtable.cc') diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 73af42e20..3b114a729 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -57,14 +57,6 @@ set_std_handle (int fd) SetStdHandle (std_consts[fd], cygheap->fdtab[fd]->get_output_handle ()); } -void -dtable::dec_console_fds () -{ - if (console_fds > 0 && !--console_fds && - myself->ctty != TTY_CONSOLE && !check_pty_fds()) - FreeConsole (); -} - int dtable::extend (int howmuch) { @@ -190,9 +182,6 @@ dtable::release (int fd) case FH_SOCKET: dec_need_fixup_before (); break; - case FH_CONSOLE: - dec_console_fds (); - break; } delete fds[fd]; fds[fd] = NULL; @@ -334,8 +323,7 @@ dtable::build_fhandler (int fd, DWORD dev, char *unix_name, case FH_CONSOLE: case FH_CONIN: case FH_CONOUT: - if ((fh = cnew (fhandler_console) ())) - inc_console_fds (); + fh = cnew (fhandler_console) (); break; case FH_PTYM: fh = cnew (fhandler_pty_master) (); -- cgit v1.2.3