diff options
author | Blair Zajac <blair@orcaware.com> | 1998-07-01 12:25:56 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-04 05:37:29 +0000 |
commit | 87c2f9c4716d6ca80eef0a77058013da1536e87d (patch) | |
tree | eb6f8530175df0397639a4be198d9849acffb09f /win32/win32sck.c | |
parent | 1289a8b80f063d20e88094098a0275f4681d9f97 (diff) | |
download | perl-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.c | 7 |
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(); |