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:
authorCorinna Vinschen <corinna@vinschen.de>2004-08-19 14:58:37 +0400
committerCorinna Vinschen <corinna@vinschen.de>2004-08-19 14:58:37 +0400
commit82b30180882f3f81298bfd45f3753dfc536ddcff (patch)
treececbc2029ee3621b699c621fa79d43ea3b0e8eb0 /winsup/cygwin/fhandler_socket.cc
parent6a19fd82fae7466d84e4c749661dd49efd84652c (diff)
* fhandler_socket.cc (fhandler_socket::dup): Decrement dtable's
need_fixup_before counter on successful dup. * net.cc (cygwin_getpeername): Add file descriptor to debug output.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 5b7b97da9..b8ec37bdc 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -344,7 +344,10 @@ fhandler_socket::dup (fhandler_base *child)
{
fhs->fixup_after_fork (hMainProc);
if (fhs->get_io_handle() != (HANDLE) INVALID_SOCKET)
- return 0;
+ {
+ cygheap->fdtab.inc_need_fixup_before ();
+ return 0;
+ }
}
debug_printf ("WSADuplicateSocket failed, trying DuplicateHandle");
}
@@ -363,6 +366,7 @@ fhandler_socket::dup (fhandler_base *child)
}
VerifyHandle (nh);
fhs->set_io_handle (nh);
+ cygheap->fdtab.inc_need_fixup_before ();
return 0;
}