I was expecting bash to handle SIGPIPE specially here,
as in this context it's informational rather than an indication of error.
I.E. if a command to the right actually does fail
the status is set to that fail and the resulting SIGPIPEs
to the left are inconsequential to the status.
If no command fails, then the SIGPIPEs are informational,
and it seems they should also be inconsequential to the status.

  $ set -o pipefail
  $ yes | head -n1 || echo error
  y
  error

cheers,
Pádraig.

Reply via email to