bug-diffutils
[Top][All Lists]
Advanced

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

[bug-diffutils] bug#59905: bug#59905: 3.8: test suite is failing


From: Jim Meyering
Subject: [bug-diffutils] bug#59905: bug#59905: 3.8: test suite is failing
Date: Mon, 16 Jan 2023 16:10:05 -0800

On Mon, Jan 16, 2023 at 9:10 AM Adam Sampson <ats@offog.org> wrote:
> I'm seeing the "colors" tests fail with diffutils 3.8 and 3.9 as well,
> and the cause turns out to be a bit surprising.
>
> The last test in "colors" checks that diff exits 141 (128 + SIGPIPE)
> when it's writing to a FIFO that is closed early. Modifying the test
> script to run diff under strace reveals that SIGPIPE's handler has been
> set to SIG_IGN when diff first queries it -- when it should be SIG_DFL
> by default. So diff's SIGPIPE handler doesn't run, and it exits 2
> instead.
>
> It turns out this is a change in GNU Make 4.3.92 and later -- make does
> signal(SIGPIPE, SIG_IGN) for its own purposes, and its child processes
> inherit that. With make 4.3, the tests work; with 4.4, this one fails.
>
> I'm not sure whether this is a fault in make, diff or the test! There
> are other programs (e.g. the Python interpreter) that spawn processes
> with SIGPIPE set to SIG_IGN, so perhaps it should be robust against
> that.

Thanks for the investigation.
I've made a small adjustment to that test, to make it work with
GNU make before and after that change.





reply via email to

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