diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-09-20 11:35:49 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-09-20 11:35:49 +0000 |
commit | a2db3c9288de0329591f7cdd3f87af2c020b4be4 (patch) | |
tree | e574e87d68795b1a025f7e7c10538c46ac0ccf5b /winsup/cygwin/fhandler_socket.cc | |
parent | 8e54fb88f368b4f582d2f40b42056d730dd229bc (diff) | |
download | newlib-a2db3c9288de0329591f7cdd3f87af2c020b4be4.zip newlib-a2db3c9288de0329591f7cdd3f87af2c020b4be4.tar.gz newlib-a2db3c9288de0329591f7cdd3f87af2c020b4be4.tar.bz2 |
* fhandler_socket.cc (fhandler_socket::fixup_after_exec): Close
socket only when not using Winsock2.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index dc76d0e..dbf284e 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -214,9 +214,10 @@ fhandler_socket::fixup_after_fork (HANDLE parent) void fhandler_socket::fixup_after_exec (HANDLE parent) { + extern WSADATA wsadata; if (!get_close_on_exec ()) fixup_after_fork (parent); - else + else if (wsadata.wVersion < 512) /* < Winsock 2.0 */ closesocket (get_socket ()); } |