bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paul Eggert
Subject: bug#64540: [PATCH] od: exit out on failure to write to stdout
Date: Sun, 9 Jul 2023 02:29:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 2023-07-08 15:43, Josef Bacik wrote:
A very weird bug was uncovered when using fstests with github actions.
In fstests we are doing something like this

od /dev/urandom | dd of=somefile bs=1M count=10

The above works fine, except in the case of github actions which runs
this script remotely, capturing the output in a pipe to print on their
console.  Somehow od ends up writing forever into the stdout pipe
without exiting in this scenario, normally it doesn't do this.

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.

Although the patch you sent is probably harmless, it's not clear that we should go through all the GNU utilities and make them check for I/O errors on every output, as that'd be a maintenance hassle and in some cases would hurt performance significantly.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]