[Top][All Lists]

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

Re: [bug #62840] make --version in pipe return SIGPIPE

From: Henrik Carlqvist
Subject: Re: [bug #62840] make --version in pipe return SIGPIPE
Date: Sat, 30 Jul 2022 23:12:54 +0200

On Sat, 30 Jul 2022 13:26:46 -0400 (EDT)
Martin Dorey <INVALID.NOREPLY@gnu.org> wrote:
> Follow-up Comment #2, bug #62840 (project make):
> Just for completeness or academic interest, then, this makes it happen
> reliably for me:
> set -o pipefail; { ruby -we '$stdout.write("x" * 4096)'; make --version; } |
> head -n1; echo $?

It was not a reliable way to reproduce the "bug" here:

bash-4.3$ set -o pipefail; { ruby -we '$stdout.write("x" * 4096)'; make
--version; } | head -n1; echo $?
xxxxxxxxxxxxxxxxGNU Make 4.1

But I would agree that it is not a bug. A program writing to a pipe is
expected to get a SIGPIPE and possibly return an error code if the pipe closes
before the program is finished.

However, the program is not guaranteed to get a SIGPIPE, there are also
buffers which the program might be able to write to even though those buffers
might not be emptied by the receiving process.

regards Henrik

reply via email to

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