Subject: Re: bug#64540: [PATCH] od: exit out on failure to write to stdout

From: Andreas Schwab <[email-masked]>
Date: Sun, 09 Jul 2023 12:14:37 +0200

On Jul 09 2023, Paul Eggert wrote:

> Do you see the same problem if you use 'cat' rather than 'od'? If so, the
> problem isn't with 'od'; it's with the environment, which is somehow set
> up to ignore SIGPIPE. It shouldn't do that, as ignoring SIGPIPE breaks a
> lot of programs, and 'od' would be just one of them.

All other utilities (including cat) handle ignored SIGPIPE correctly.

$ (trap '' PIPE; cat /dev/zero | :)
cat: write error: Broken pipe

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."