From abbc75ce4f811881ce21dfcb7e4dc1c3abf18454 Mon Sep 17 00:00:00 2001 From: corinna Date: Wed, 23 Jun 2004 07:36:20 +0000 Subject: [PATCH] * fhandler_socket.cc (fhandler_socket::release): Call WSASetLastError last. --- winsup/cygwin/ChangeLog | 7 ++++++- winsup/cygwin/fhandler_socket.cc | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0a9d16d108..fe1b730ea2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2004-06-23 Pierre Humblet + + * fhandler_socket.cc (fhandler_socket::release): Call + WSASetLastError last. + 2004-06-21 Christopher Faylor * autoload.cc (wsock_init): Keep lock while modifying return address. @@ -7,7 +12,7 @@ * fhandler.cc (fhandler_base::open): Remove 9x specific code. 2004-06-17 Pierre Humblet - + * fhandler.cc (fhandler_base::open_9x): Do not check for null name. Move debug_printf to common code line. (fhandler_base::open): Ditto. Initialize upath. Remove second argument diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index f37b2c9a2f..5b7b97da93 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -792,12 +792,12 @@ fhandler_socket::release (HANDLE event) int last_err = WSAGetLastError (); /* KB 168349: NT4 fails if the event parameter is not NULL. */ WSAEventSelect (get_socket (), NULL, 0); + WSACloseEvent (event); unsigned long non_block = 0; if (ioctlsocket (get_socket (), FIONBIO, &non_block)) debug_printf ("return to blocking failed: %d", WSAGetLastError ()); else WSASetLastError (last_err); - WSACloseEvent (event); } int -- 2.11.0