Chet Ramey (<[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:
{ pid=$BASHPID; trap : USR1;
(sleep 1; kill -USR1 "$pid") &
printf %0100000d 1;
} | sleep 20