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>2009-11-23 17:50:14 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-11-23 17:50:14 +0300
commit27bbefdefd339676bee4238e996df70e89fcdfa1 (patch)
tree54a83e54cc0997621e6158beedb51a6a418245ea /winsup/cygwin/fhandler_socket.cc
parent013e402bfc6d661d5884cd65888be06fa6e19c4f (diff)
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add
socket handle value to debug output. (fhandler_socket::fixup_after_fork): Ditto. Make new socket handle OVERLAPPED, just as if it has been created with socket(). * net.cc (fdsock): Close duplicated socket and explain why. Disable the entire WSADuplicateSocket test for now and explain why.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index ba230dff1..5f22d7da1 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -652,7 +652,7 @@ fhandler_socket::fixup_before_fork_exec (DWORD win_pid)
if (ret)
set_winsock_errno ();
else
- debug_printf ("WSADuplicateSocket succeeded");
+ debug_printf ("WSADuplicateSocket succeeded (%lx)", prot_info_ptr->dwProviderReserved);
return (int) ret;
}
@@ -669,7 +669,8 @@ fhandler_socket::fixup_after_fork (HANDLE parent)
}
SOCKET new_sock = WSASocketW (FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO, prot_info_ptr, 0, 0);
+ FROM_PROTOCOL_INFO, prot_info_ptr, 0,
+ WSA_FLAG_OVERLAPPED);
if (new_sock == INVALID_SOCKET)
{
set_winsock_errno ();
@@ -681,7 +682,7 @@ fhandler_socket::fixup_after_fork (HANDLE parent)
socket is potentially inheritable again. */
SetHandleInformation ((HANDLE) new_sock, HANDLE_FLAG_INHERIT, 0);
set_io_handle ((HANDLE) new_sock);
- debug_printf ("WSASocket succeeded");
+ debug_printf ("WSASocket succeeded (%lx)", new_sock);
}
}