From 2f35e1e146592806dce5701ed853c516283399f1 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 14 Dec 2004 08:10:32 +0000 Subject: * win32/win32.c (rb_w32_close): need to reset osfhnd(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ win32/win32.c | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 88ca3576eb..c65b0cb3bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Dec 14 17:08:15 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_close): need to reset osfhnd(). + Tue Dec 14 14:03:57 2004 GOTOU Yuuzou * ext/openssl/ossl.c (ossl_raise): avoid buffer overrun. diff --git a/win32/win32.c b/win32/win32.c index 5dafc0320f..7a7078335f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3421,6 +3421,7 @@ rb_w32_close(int fd) UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN); return _close(fd); } + _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE); if (closesocket(sock) == SOCKET_ERROR) { errno = map_errno(WSAGetLastError()); return -1; -- cgit v1.2.3