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.

Cheers,

-- 
Adam Sampson <a...@offog.org>                         <http://offog.org/>



Reply via email to