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

2018-12-28 Thread Bize Ma
Eduardo Bustamante () wrote: > > (...) > What if instead of > complaining you do something about it, like, fixing the problem (send > a patch)? > You are assuming that if I take a look at the c code I will be able to read it, then understand it, and then make meaningful, or even reasonable cha

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

2018-12-26 Thread Chet Ramey
On 12/25/18 3:01 PM, Bize Ma wrote: > No, that is not the intent. I merely failed to correctly convey the > perception that others have of your code: > > https://unix.stackexchange.com/a/487260/265604 That is, of course, their privilege. > And, having failed, I am trying again. > > But, probab

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

2018-12-25 Thread Eduardo Bustamante
On Tue, Dec 25, 2018 at 12:01 PM Bize Ma wrote: (...) > But, probably, I should just not inform you of what others think given your > upfront rejection to any (constructive) criticism. (..) > Do as you wish, we will still be able to form our own opinion about buggy > code. This is not constructiv

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

2018-12-25 Thread Bize Ma
Chet Ramey () wrote: > On 12/19/18 10:15 PM, Bize Ma wrote: > > Ah, now we're moving the goalposts. No, that is not the intent. I merely failed to correctly convey the perception that others have of your code: https://unix.stackexchange.com/a/487260/265604 And, having failed, I am trying aga

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

2018-12-21 Thread Chet Ramey
On 12/19/18 10:15 PM, Bize Ma wrote: > Chet Ramey (mailto:chet.ra...@case.edu>>) 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

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

2018-12-19 Thread Bize Ma
Chet Ramey () 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

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

2018-12-19 Thread Chet Ramey
On 12/18/18 8:06 PM, Bize Ma wrote: > In here: > https://lists.gnu.org/archive/html/bug-bash/2018-01/msg00032.html > > > You promised: > > The > next version of bash will install its SIGWINCH handler with SA_RESTART. > > > > Yet: > Still a bug in bash version 5 And yet, when you look at the

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

2018-12-18 Thread Bize Ma
In here: https://lists.gnu.org/archive/html/bug-bash/2018-01/msg00032.html You promised: The next version of bash will install its SIGWINCH handler with SA_RESTART. Yet: Still a bug in bash version 5

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

2018-12-10 Thread Chet Ramey
On 12/9/18 12:45 PM, Pusillanimous Pussyfooter wrote: >> There are a couple of signals for which this is the appropriate behavior. >> The right fix is to install handlers with the SA_RESTART flag set. The >> next version of bash will install its SIGWINCH handler with SA_RESTART. > > Here is a triv

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

2018-12-09 Thread Pusillanimous Pussyfooter
> There are a couple of signals for which this is the appropriate behavior. > The right fix is to install handlers with the SA_RESTART flag set. The > next version of bash will install its SIGWINCH handler with SA_RESTART. Here is a trivial patch doing just that, though IMHO it would be much bette

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

2018-01-12 Thread Chet Ramey
On 1/12/18 12:05 PM, Serge van den Boom wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > If during an 'echo' or 'printf', the write() system call returns an > EINTR error, the write() call is not retried. > This can can happen when a syst

write() not retried after EINTR in printf and echo

2018-01-12 Thread Serge van den Boom
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/opt/bash-4.4.12