Let select again sleep forever if requested by the RTS.
I think the past fixes made this kludge superfluous.
This commit is contained in:
parent
56a243b53f
commit
a51ba12623
|
@ -625,11 +625,10 @@ queue_ready_ports(bool wait, long seconds, long ticks)
|
||||||
tvp = &tv;
|
tvp = &tv;
|
||||||
if (wait)
|
if (wait)
|
||||||
if (seconds == -1){
|
if (seconds == -1){
|
||||||
tv.tv_sec = 1;
|
tvp = NULL;
|
||||||
tv.tv_usec = 0;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tv.tv_sec = (seconds > 0) ? 1 : 0;
|
tv.tv_sec = seconds;
|
||||||
tv.tv_usec = ticks * (1000000 / TICKS_PER_SECOND);
|
tv.tv_usec = ticks * (1000000 / TICKS_PER_SECOND);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -654,18 +653,6 @@ queue_ready_ports(bool wait, long seconds, long ticks)
|
||||||
poll_time = -1;
|
poll_time = -1;
|
||||||
return NO_ERRORS;
|
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)
|
else if (left == 0)
|
||||||
return NO_ERRORS;
|
return NO_ERRORS;
|
||||||
else if (errno == EINTR) {
|
else if (errno == EINTR) {
|
||||||
|
|
Loading…
Reference in New Issue