> Chet Ramey <[EMAIL PROTECTED]> wrote:
> > `echo' now displays an error message on write errors.
>
> In the case of a SIGPIPE trap, is it intended that echo sees EPIPE
> before the SIGPIPE handler runs?
Yes. POSIX requires that trap handling be deferred until a `foreground
utility' completes, a
Chet Ramey <[EMAIL PROTECTED]> wrote:
> `echo' now displays an error message on write errors.
In the case of a SIGPIPE trap, is it intended that echo sees EPIPE
before the SIGPIPE handler runs?
paul
___
Bug-bash mailing list
Bug-bash@gnu.org
http://l
> If there is no trap set it doesn't report an error. So is this
> special behaviour only triggered when there is a trap for SIGPIPE in
> place?
It's not `special', except maybe in the sense that catching a signal
rather than letting it terminate the process causes writes to return
errors.
Chet
On Mon, Jan 09, 2006 at 02:22:11PM -0500, Chet Ramey wrote:
> > bash-3.1:
> >
> > $ bash -c 'trap exit SIGPIPE; echo foo' | :
> > bash: line 0: echo: write error: Broken pipe
> > $
> >
> > Is this change in behaviour intentional, or a regression?
>
> It's intentional, and doesn't have anything
Tim Waugh wrote:
> Comparing bash-3.0 (with config-top.h modified so that
> DONT_REPORT_SIGPIPE is defined) with bash-3.1 (where this is the
> default anyway) shows up a change in behaviour.
>
> bash-3.0:
>
> $ bash -c 'trap exit SIGPIPE; echo foo' | :
> $
>
> bash-3.1:
>
> $ bash -c 'trap exi