From: Blair Zajac Date: Wed, 1 Jul 1998 19:25:56 +0000 (-0700) Subject: make 4-arg win32_select() sleep more reasonably on false values X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87c2f9c4716d6ca80eef0a77058013da1536e87d;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/win32/win32sck.c b/win32/win32sck.c index 74af5d7..8929ea7 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();