From 611d92e24c092849635b8395ec97e9c7140a6324 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 14 Oct 2001 04:14:24 +0000 Subject: * autoload.cc (load_wsock32): Declare dummy function to force loading of winsock. * fhandler.cc (fhandler_base::set_inheritance): Make debugging output more verbose. * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Force loading of winsock32 if winsock2 not available. * net.cc (set_socket_inheritance): Use DuplicateHandle in all cases to set inheritance correctly. (fdsock): Use winsock2_active macro to determine when to set socket inheritance. Remove fdtab resource locking since this function should already be protected. (cygwin_accept): Simplify logic. Ensure that fdtab unlock is not called inappropriately. (cygwin_rcmd): Use fdtab locking. (cygwin_rresvport): Ditto. (cygwin_rexec): Ditto. * select.cc (peek_socket): Set errno appropriately if winsock select fails. * winsup.h: Declare check_pty_fds. * syscalls.cc (check_pty_fds): Rename from check_ttys_fds. Also check pty master. (setsid): Use check_pty_fds. * dtable.cc (dtable::dec_console_fds): Add check on pty fds. --- winsup/cygwin/dtable.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/dtable.cc') diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 694a7cd84..e63bad970 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -55,7 +55,8 @@ set_std_handle (int fd) void dtable::dec_console_fds () { - if (console_fds > 0 && !--console_fds && myself->ctty != TTY_CONSOLE) + if (console_fds > 0 && !--console_fds && + myself->ctty != TTY_CONSOLE && !check_pty_fds()) FreeConsole (); } -- cgit v1.2.3