Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: subtle `echo' bug

Peter Stephenson wrote:
> You can show this up with
> trap '' PIPE
> which causes zsh to report the error as a side effect (for reasons I
> haven't investigated: possibly the error message isn't getting time to
> emerge in the other case, which may be a bug).

This is rather garbled: the error message shown was a write error which
you certainly wouldn't see if the process that failed to write received
a SIGPIPE.  The question is whether the rest of the shell should
indicate the failure.  I think some shells indicate when a child
received SIGPIPE.

Experimentation suggests a SIGPIPE to a subprocess in a pipeline in
other shells doesn't cause the shell to abort execution.  I'm not sure
where the logic in zsh is that's causing this.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.


Messages sorted by: Reverse Date, Date, Thread, Author