diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-06 07:21:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-06 07:21:26 +0000 |
commit | 64e7ed11fda266dbbd72e6b80acd310149b1ec71 (patch) | |
tree | f5320945b9bfd9fc19b133335a7be45076fe03e9 /win32 | |
parent | 71898e529579cd40593098e619ed16346a861a50 (diff) | |
download | ruby-64e7ed11fda266dbbd72e6b80acd310149b1ec71.tar.gz ruby-64e7ed11fda266dbbd72e6b80acd310149b1ec71.tar.xz ruby-64e7ed11fda266dbbd72e6b80acd310149b1ec71.zip |
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/ruby.def | 1 | ||||
-rw-r--r-- | win32/win32.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/win32/ruby.def b/win32/ruby.def index 8f5977c53..ebb37a0d3 100644 --- a/win32/ruby.def +++ b/win32/ruby.def @@ -377,6 +377,7 @@ EXPORTS rb_hash_new rb_hash_aref rb_hash_aset + rb_hash_delete_if rb_path_check rb_env_path_tainted ruby_setenv diff --git a/win32/win32.c b/win32/win32.c index 2bc633a21..e7721178b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -11,6 +11,7 @@ */ #include "ruby.h" +#include "rubysig.h" #include <fcntl.h> #include <process.h> #include <sys/stat.h> @@ -1884,6 +1885,7 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, fd_set file_rd; fd_set file_wr; int file_nfds; + int trap_immediate = rb_trap_immediate; if (!NtSocketsInitialized++) { StartSockets(); @@ -1902,6 +1904,8 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, if (wr) *wr = file_wr; return file_nfds; } + if (trap_immediate) + TRAP_END; if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) { errno = WSAGetLastError(); switch (errno) { @@ -1910,6 +1914,8 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, break; } } + if (trap_immediate) + TRAP_BEG; return r; } @@ -1949,12 +1955,17 @@ SOCKET myaccept (SOCKET s, struct sockaddr *addr, int *addrlen) { SOCKET r; + int trap_immediate = rb_trap_immediate; if (!NtSocketsInitialized++) { StartSockets(); } + if (trap_immediate) + TRAP_END; if ((r = accept (TO_SOCKET(s), addr, addrlen)) == INVALID_SOCKET) errno = WSAGetLastError(); + if (trap_immediate) + TRAP_BEG; return r; } |