]> git.ipfire.org Git - thirdparty/coreutils.git/commit
timeout: print the signal number 0 instead of EXIT
authorCollin Funk <collin.funk1@gmail.com>
Wed, 3 Dec 2025 03:16:23 +0000 (19:16 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Wed, 3 Dec 2025 03:16:23 +0000 (19:16 -0800)
commitc00a0941881e36a71c999f50a51ac6d36b31558f
treee217bc0c851baa2d4fff6029b12ca7283b631f0d
parent86061ddbbdb4194362ede72f9900297d8d31d051
timeout: print the signal number 0 instead of EXIT

POSIX.1-2024 added sig2str but leaves the behavior when called with
signal 0 unspecified. FreeBSD 15.0 does not return the signal name EXIT
like Gnulib's version causing a test failure. This fixes that and
changes the behavior to print 0 instead of EXIT, to avoid confusion when
the program does not exit.

* NEWS: Mention the change.
* src/timeout.c (cleanup): Use snprintf instead of sig2str if the signal
is 0.
* tests/timeout/timeout.sh: Updated the expected output.
NEWS
src/timeout.c
tests/timeout/timeout.sh