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 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 to do with job control or processes dying from SIGPIPE in general. There were several bug reports filed against bash-3.0 complaining that the only way to check whether or not echo failed to write requested data was to use the exit status. (Mostly in connection with redirected output on a full or unavailable file system.) `echo' now displays an error message on write errors. `printf' does the same thing. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live Strong. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://tiswww.tis.case.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash