* 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.
This commit is contained in:
Corinna Vinschen
2004-08-19 10:58:37 +00:00
parent 6a19fd82fa
commit 82b3018088
3 changed files with 12 additions and 2 deletions

View File

@@ -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;
}