bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write() not retried after EINTR in printf and echo


From: Bize Ma
Subject: Re: write() not retried after EINTR in printf and echo
Date: Wed, 19 Dec 2018 22:15:27 -0500

Chet Ramey (<address@hidden>) 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]