From a51ba12623f09fe0a57ad555f4d8dcb8cd03f345 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Wed, 5 Mar 2003 17:33:41 +0000 Subject: [PATCH] Let select again sleep forever if requested by the RTS. I think the past fixes made this kludge superfluous. --- c/unix/event.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/c/unix/event.c b/c/unix/event.c index 1dd3271..9d98ccf 100644 --- a/c/unix/event.c +++ b/c/unix/event.c @@ -625,11 +625,10 @@ queue_ready_ports(bool wait, long seconds, long ticks) tvp = &tv; if (wait) if (seconds == -1){ - tv.tv_sec = 1; - tv.tv_usec = 0; + tvp = NULL; } else { - tv.tv_sec = (seconds > 0) ? 1 : 0; + tv.tv_sec = seconds; tv.tv_usec = ticks * (1000000 / TICKS_PER_SECOND); } else @@ -654,18 +653,6 @@ queue_ready_ports(bool wait, long seconds, long ticks) poll_time = -1; return NO_ERRORS; } - else if (wait && (left == 0) && (limfd == 0)){ - if (seconds > 1){ - seconds--; - tv.tv_sec = 1; /* select maybe destroyed tv */ - tv.tv_usec = 0; /* we already waited the usecs */ - } - else if (seconds > -1) return NO_ERRORS; - else { /* loop if seconds == -1 */ - tv.tv_sec = 1; - tv.tv_usec = 0; - } - } else if (left == 0) return NO_ERRORS; else if (errno == EINTR) {