Subject: Re: race in sleep.
To: John Birrell <email@example.com>
From: J.T. Conklin <firstname.lastname@example.org>
Date: 10/16/1995 22:55:54
> For me it would be nice if [u]sleep didn't need to fiddle with
> signal handlers at all. We often strike this sort of thing on
> systems which don't have a nanosleep() function. We use a call to
> select() specifying the timeout value, but with nfds set to zero.
But the current behavior of [u]sleep wrt. signal handlers is specified
by POSIX and the Single UNIX Spec. If we want to be compatible, we're
tied to something like the current implementation.
I believe one of the newer POSIX standards introduced nanosleep, which
can be implemented as a wrapper around select. I have no problem with
adding it to our C library.