projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2bb575
)
[win32] support win32_select(0,0,0,msec) (winsock doesn't)
author
Gurusamy Sarathy
<gsar@cpan.org>
Wed, 4 Feb 1998 03:34:36 +0000
(
03:34
+0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Wed, 4 Feb 1998 03:34:36 +0000
(
03:34
+0000)
p4raw-id: //depot/win32/perl@461
win32/win32sck.c
patch
|
blob
|
history
diff --git
a/win32/win32sck.c
b/win32/win32sck.c
index
8019cc3
..
14d2e6a
100644
(file)
--- a/
win32/win32sck.c
+++ b/
win32/win32sck.c
@@
-269,6
+269,14
@@
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)