Re: Lack of Documentation about SA_RESTART...

Theodore Ts'o
2005-07-24T23:47:42Z

On Sat, Jul 23, 2005 at 05:30:42PM -0700, Linus Torvalds wrote:
> On Mon, 11 Jul 2005, Theodore Ts'o wrote:
> >
> > According to the Single Unix Specification V3, all functions that
> > return EINTR are supposed to restart if a process receives a signal
> > where signal handler has been installed with the SA_RESTART flag.
>
> That can't be right.
>
> Some operations, like "select()" and "pause()" always return EINTR, and
> indeed, real applications will break if you always restart. Restarting a
> pause() would be nonsensical.

The spect says "unless otherwise specified". The description for
pause() states that the process will sleep until receiving a signal
that terminates the process or causes it to call signal-handling
function. That would presumably count as an "otherwise specified".

- Ted