Re: [PATCH] Re: SIGPIPE and tee

2019-10-07 Thread Sam Liddicott
Thanks - that change is great. Busybox tee now propagates SIGPIPE just like GNU tee does by default. Sam On Mon, 7 Oct 2019 at 13:27, Denys Vlasenko wrote: > On Fri, Oct 4, 2019 at 11:20 AM Sam Liddicott wrote: > > nudge on this attached patch > > > > ---

Re: [PATCH] Re: SIGPIPE and tee

2019-10-07 Thread Denys Vlasenko
On Fri, Oct 4, 2019 at 11:20 AM Sam Liddicott wrote: > nudge on this attached patch > > -- Forwarded message - > From: Sam Liddicott > Date: Fri, 13 Sep 2019 at 11:15 > Subject: Re: SIGPIPE and tee > To: busybox > > > Here is a patch which invoke

[PATCH] Re: SIGPIPE and tee

2019-10-04 Thread Sam Liddicott
nudge on this attached patch -- Forwarded message - From: Sam Liddicott Date: Fri, 13 Sep 2019 at 11:15 Subject: Re: SIGPIPE and tee To: busybox Here is a patch which invokes kill_myself_with_sig(SIGPIPE) if fwrite fails with errno=EPIPE. Quitting with a signal rather than

Re: SIGPIPE and tee

2019-09-13 Thread Sam Liddicott
Here is a patch which invokes kill_myself_with_sig(SIGPIPE) if fwrite fails with errno=EPIPE. Quitting with a signal rather than a diagnostic output emulates GNU tee which is in line with the apparent reason for busybox tee in ignoring SIGPIPE in the first place. I have tested

Re: SIGPIPE and tee

2019-09-13 Thread Sam Liddicott
ils/tee.c we read: > > /* gnu tee ignores SIGPIPE in case one of the output files is a pipe > * that doesn't consume all its input. Good idea... */ > signal(SIGPIPE, SIG_IGN); > > > Sadly, this breaks POSIX SIGPIPE behaviour with respect to quitting when > s

SIGPIPE and tee

2019-09-12 Thread Sam Liddicott
In https://git.busybox.net/busybox/tree/coreutils/tee.c we read: /* gnu tee ignores SIGPIPE in case one of the output files is a pipe * that doesn't consume all its input. Good idea... */ signal(SIGPIPE, SIG_IGN); Sadly, this breaks POSIX SIGPIPE behaviour with respect