1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2004-12-14 08:10:32 +00:00
parent 2235b8c36d
commit 2f35e1e146
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Tue Dec 14 17:08:15 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_close): need to reset osfhnd().
Tue Dec 14 14:03:57 2004 GOTOU Yuuzou <gotoyuzo@notwork.org> Tue Dec 14 14:03:57 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl.c (ossl_raise): avoid buffer overrun. * ext/openssl/ossl.c (ossl_raise): avoid buffer overrun.

View file

@ -3421,6 +3421,7 @@ rb_w32_close(int fd)
UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN); UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
return _close(fd); return _close(fd);
} }
_set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
if (closesocket(sock) == SOCKET_ERROR) { if (closesocket(sock) == SOCKET_ERROR) {
errno = map_errno(WSAGetLastError()); errno = map_errno(WSAGetLastError());
return -1; return -1;