git: timeout(1): Kill self with the same signal that terminated the child

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 18 19:35:55 PDT 2025


commit a45b63eb7d9bab91e52c1cfdf4d7041fbb5a48e8
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Mar 13 07:05:26 2025 +0800

    timeout(1): Kill self with the same signal that terminated the child
    
    A shell may not set '$?' to '128 + signal_number' when the process was
    terminated by a signal.  For example, KornShell 93 sets '$?' to
    '256 + signal_number' in such cases.  In order to avoid any possible
    ambiguity, the POSIX.1-2024 standard requires that timeout mimic the
    wait status of the child process by terminating itself with the same
    signal, while disabling core generation.
    
    Update the man page accordingly.
    
    Reference: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/timeout.html

Summary of changes:
 usr.bin/timeout/timeout.1 | 63 ++++++++++++++++++++++-------------------------
 usr.bin/timeout/timeout.c | 34 +++++++++++++++++++++++--
 2 files changed, 62 insertions(+), 35 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a45b63eb7d9bab91e52c1cfdf4d7041fbb5a48e8


-- 
DragonFly BSD source repository


More information about the Commits mailing list