while (1)
{
int nfds = (safe_poll ((SR_ENTRIES (r)), (SR_N_FDS (r)), blockp));
- if (nfds >= 0)
+ if (nfds > 0)
return (nfds);
if (nfds < 0 && errno != EINTR)
error_system_call (errno, syscall_select);
return (SELECT_PROCESS_STATUS_CHANGE);
if (pending_interrupts_p ())
return (SELECT_INTERRUPT);
+ if (nfds == 0) /* and no status-change nor interrupts pending */
+ return (0);
}
}
return (SELECT_PROCESS_STATUS_CHANGE);
if (pending_interrupts_p ())
return (SELECT_INTERRUPT);
- /* nfds == 0, AND no status-change nor interrupts pending */
- return (0);
+ if (nfds == 0) /* and no status-change nor interrupts pending */
+ return (0);
}
}
(SR_RREADERS (r)),
(SR_RWRITERS (r)),
blockp));
- if (nfds >= 0)
+ if (nfds > 0)
return (nfds);
if (nfds < 0 && errno != EINTR)
error_system_call (errno, syscall_select);
return (SELECT_PROCESS_STATUS_CHANGE);
if (pending_interrupts_p ())
return (SELECT_INTERRUPT);
+ if (nfds == 0) /* and no status-change nor interrupts pending */
+ return (0);
}
#else
error_system_call (ENOSYS, syscall_select);
return (SELECT_PROCESS_STATUS_CHANGE);
if (pending_interrupts_p ())
return (SELECT_INTERRUPT);
- /* nfds == 0, AND no status-change nor interrupts pending */
- return (0);
+ if (nfds == 0) /* and no status-change nor interrupts pending */
+ return (0);
}
#else
error_system_call (ENOSYS, syscall_select);