diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-11-23 14:50:14 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-11-23 14:50:14 +0000 |
commit | 27bbefdefd339676bee4238e996df70e89fcdfa1 (patch) | |
tree | 54a83e54cc0997621e6158beedb51a6a418245ea /winsup/cygwin/fhandler_socket.cc | |
parent | 013e402bfc6d661d5884cd65888be06fa6e19c4f (diff) | |
download | cygnal-27bbefdefd339676bee4238e996df70e89fcdfa1.tar.gz cygnal-27bbefdefd339676bee4238e996df70e89fcdfa1.tar.bz2 cygnal-27bbefdefd339676bee4238e996df70e89fcdfa1.zip |
* 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.cc | 7 |
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); } } |