Comment 13 for bug 185601

Revision history for this message
Derick Eddington (derick-eddington) wrote :

On Sat, 2008-06-14 at 02:33 +0000, Derick Eddington wrote:
On Fri, 2008-06-13 at 12:51 +0000, Abdulaziz Ghuloum wrote:
> However, having the
> process accept SIGCHLD means nearly every system-call might be
> interrupted by the delivery of a SIGCHLD and return errno==EINTR, and
> this requires checking for EINTR for every syscall (except specified-
> duration sleep, which I don't think there's a solution to) and redoing
> the syscall.

TMI, I realized there's an obvious solution to the problem of specified-duration sleep being interrupted by delivery of a SIGCHLD: block signals before sleeping and unblock them after. In the modifications I mentioned above, I already implemented functions to block and unblock signals, so doing so for sleep would be easy.