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

* thread_win32.ci (w32_wait_events): check whether interrupt_event is

valid handle or not.

	* thread_win32.ci (native_thread_destroy): clear interrupt_event when
	  close it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2007-04-10 08:37:21 +00:00
parent 0d2ec8d2f4
commit edac529177
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,11 @@
Tue Apr 10 17:37:36 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* thread_win32.ci (w32_wait_events): check whether interrupt_event is
valid handle or not.
* thread_win32.ci (native_thread_destroy): clear interrupt_event when
close it.
Mon Apr 9 09:30:44 2007 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/imap.rb (disconnect): call shutdown for

View file

@ -3634,6 +3634,7 @@ rb_w32_fclose(FILE *fp)
{
int fd = fileno(fp);
SOCKET sock = TO_SOCKET(fd);
int save_errno = errno;
if (fflush(fp)) return -1;
if (!is_socket(sock)) {
@ -3642,6 +3643,7 @@ rb_w32_fclose(FILE *fp)
}
_set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
fclose(fp);
errno = save_errno;
if (closesocket(sock) == SOCKET_ERROR) {
errno = map_errno(WSAGetLastError());
return -1;
@ -3653,6 +3655,7 @@ int
rb_w32_close(int fd)
{
SOCKET sock = TO_SOCKET(fd);
int save_errno = errno;
if (!is_socket(sock)) {
UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
@ -3660,6 +3663,7 @@ rb_w32_close(int fd)
}
_set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
_close(fd);
errno = save_errno;
if (closesocket(sock) == SOCKET_ERROR) {
errno = map_errno(WSAGetLastError());
return -1;