summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-06 07:21:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-06 07:21:26 +0000
commitd1375688cdde3d094984f7f3a7bffe57306a0bca (patch)
treef5320945b9bfd9fc19b133335a7be45076fe03e9 /win32
parenta60db057a2a8456f8f5b59a6c5805e25d1d47d34 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/ruby.def1
-rw-r--r--win32/win32.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/win32/ruby.def b/win32/ruby.def
index 8f5977c..ebb37a0 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 2bc633a..e772117 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;
}