On 12/19/18 10:15 PM, Bize Ma wrote:
> Chet Ramey (<[email protected] <mailto:[email protected]>>) wrote:
>
> And yet, when you look at the source, the signal handlers are installed
> with SA_RESTART. For example,
>
>
>
> # if defined (SIGWINCH)
> act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0;
> # else
> act.sa_flags = 0;
> # endif /* SIGWINCH */
>
> in lib/readline/signals.c:rl_set_sighandler().
>
>
> True for SIGWINCH, but "write error: Interrupted system call"
> is still exposed to users (which it shouldn't) for other signals:
Ah, now we're moving the goalposts. There's a case to be made for doing
that, I suppose, but I'd rather defer to the system's default handling
for a particular signal.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/