Email List: Xaustin-group-lX
[All Lists]

Re: Stop signals and interruption of system calls on Linux

To: "Manfred Spraul" <yyyyyyy@xxxxxxxxxxxxxxxx>, "Paul Eggert" <yyyyyy@xxxxxxxxxxx>
Subject: Re: Stop signals and interruption of system calls on Linux
From: <yyyyyy@xxxxxxx>
Date: Mon, 16 Feb 2004 16:34:12 -0000
Cc: "Michael T Kerrisk" <yyyyyyyyy@xxxxxxx>, <yyyyyyyyyyyyyy@xxxxxxxxxxxxx>

Manfred Spraul <yyyyyyy@xxxxxxxxxxxxxxxx> said:
> Quoting your old comp.std.unix posting:
> 
> >However, see subclause 3.3.1.4, which describes the effects of signals
> >on other functions, and contains:
> >
> >    If the action of the signal is to invoke a signal-catching
> >    function, ... the original function is said to be *interrupted* by
> >    the signal.
> >
> >This, and other wording in 3.3.1.4 makes it clear, I think, that the
> >bit about EINTR in the description of read() does not apply to job
> >control signals that were not caught.
> 
> Does that mean that signals that are not delivered to user space should 
> never cause a syscall to return with -1, errno=EINTR?

No, the bit about EINTR is just a requirement that the syscall must fail and 
set errno to a particular value in particular circumstances.  In 
circumstances where no such requirement applies, the syscall is still free to 
fail and set errno to whatever the implementor felt appropriate, including 
EINTR.

Unless, of course, the standard says somewhere that the call is not allowed 
to fail in those circumstances.  One can argue that the quote about how a 
function is supposed to continue after an SIGCONT says just that, but I'm not 
sure that it says it clearly enough to let you sue an implementor and win 
money from him...

<Prev in Thread] Current Thread [Next in Thread>