Andreas Schwab wrote:
I get this:
$ bash -c 'trap "" PIPE; sleep 1; echo a; echo b > a' | :
bash: line 0: echo: write error: Broken pipe
and the file contains only one line.
Andreas.
I did more tests, and this is what I came up with:
- akula, my bleeding edge box, is a Debian-unstable box upgraded
yesterday sept 8, 2007. It runs linux-2.6.17.7, libc6-2.6.1
- kilo, my most up-to-date box where bash still seems to behave properly
with regard to that problem, is also a Debian-unstable box, upgraded on
may 1st, 2007. It runs linux2.6.18, libc6-2.5
On both boxes, I tried Stephane's test line with bash-3.1.17 and bash-2.05b:
On both boxes, with bash-3.1.17, I get the "bash: line 0: echo: write
error: Broken pipe" message, and no error message with bash-2.05b.
On akula, both versions of bash generate a file with 2 lines.
On kilo, both version of bash generate a correct file with 1 line.
I hope this helps. I'll keep the kilo box in "working bash state" if
anybody wants ssh access to it to test further.