summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 17:34:34 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 17:34:34 +0000
commit567b3f27bc31d6c040d221f376cd7a9236ef7718 (patch)
treefb0ee11e9de596418d950fbf31d33e52f8092314
parente92e55daad75560bf5a00b517820214f129ba469 (diff)
parent7e3be867c805de9df8b4e2ab54f88f956419821c (diff)
downloadperl-567b3f27bc31d6c040d221f376cd7a9236ef7718.tar.gz
Integrate win32 branch into mainline
p4raw-id: //depot/perl@483
-rw-r--r--win32/win32sck.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/win32/win32sck.c b/win32/win32sck.c
index 5ac2ef6c65..14d2e6a45f 100644
--- a/win32/win32sck.c
+++ b/win32/win32sck.c
@@ -269,6 +269,15 @@ win32_select(int nfds, Perl_fd_set* rd, Perl_fd_set* wr, Perl_fd_set* ex, const
int i, fd, bit, offset;
FD_SET nrd, nwr, nex, *prd, *pwr, *pex;
+ /* winsock seems incapable of dealing with all three null fd_sets,
+ * so do the (millisecond) sleep as a special case
+ */
+ if (!(rd || wr || ex)) {
+ Sleep(timeout->tv_sec * 1000 +
+ timeout->tv_usec / 1000); /* do the best we can */
+ return 0;
+ }
+ StartSockets();
PERL_FD_ZERO(&dummy);
if (!rd)
rd = &dummy, prd = NULL;