summaryrefslogtreecommitdiff
path: root/win32/win32sck.c
diff options
context:
space:
mode:
authorBlair Zajac <blair@orcaware.com>1998-07-01 12:25:56 -0700
committerGurusamy Sarathy <gsar@cpan.org>1998-07-04 05:37:29 +0000
commit87c2f9c4716d6ca80eef0a77058013da1536e87d (patch)
treeeb6f8530175df0397639a4be198d9849acffb09f /win32/win32sck.c
parent1289a8b80f063d20e88094098a0275f4681d9f97 (diff)
downloadperl-87c2f9c4716d6ca80eef0a77058013da1536e87d.tar.gz
make 4-arg win32_select() sleep more reasonably on false values
Message-Id: <199807020225.TAA18740@gobi.gps.caltech.edu> Date: Wed, 1 Jul 1998 19:25:56 -0700 (PDT) Subject: [PATCH 5.004_69] select dumps core on MSWin32-x86 -- Message-Id: <199807030107.SAA08595@gobi.gps.caltech.edu> Date: Thu, 2 Jul 1998 18:07:19 -0700 (PDT) Subject: [PATCH 5.004_69] select dumps core on MSWin32-x86 p4raw-id: //depot/perl@1303
Diffstat (limited to 'win32/win32sck.c')
-rw-r--r--win32/win32sck.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/win32/win32sck.c b/win32/win32sck.c
index 74af5d7756..8929ea7d09 100644
--- a/win32/win32sck.c
+++ b/win32/win32sck.c
@@ -310,8 +310,11 @@ win32_select(int nfds, Perl_fd_set* rd, Perl_fd_set* wr, Perl_fd_set* ex, const
* 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 */
+ if (timeout)
+ Sleep(timeout->tv_sec * 1000 +
+ timeout->tv_usec / 1000); /* do the best we can */
+ else
+ Sleep(UINT_MAX);
return 0;
}
StartSockets();