bug-coreutils
[Top][All Lists]
Advanced

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

bug#51135: timeout: --foreground causes exit status 124, even if KILL wa


From: Pádraig Brady
Subject: bug#51135: timeout: --foreground causes exit status 124, even if KILL was used
Date: Mon, 11 Oct 2021 22:04:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 11/10/2021 19:01, Christoph Anton Mitterer wrote:
Hey.


This time I've also checked the 9.0 documentation (hopefully I wasn't
just too blind).


I noticed that whenever --foreground is used, timeout exits with a 124
status (instead of the documented 128+9) regardless of whether the KILL
is sent because of --signal=KILL or --kill-after=n .

Yes --foreground gives timeout(1) more control over the exit status in this 
case.
I'll add some clarification to the texinfo manual along these lines:


-In case of the @samp{KILL(9)} signal, @command{timeout} returns with
+In the case of the @samp{KILL(9)} signal, @command{timeout} returns with
 exit status 137, regardless of whether that signal is sent to @var{command}
 or to @command{timeout} itself, i.e., these cases cannot be distinguished.
 In the latter case, the @var{command} process may still be alive after
 @command{timeout} has forcefully been terminated.
+However if the @option{--foreground} option is specified then
+@command{timeout} will not send any signals to its own process,
+and so it will exit with one of the other exit status values detailed above.

thanks,
Pádraig





reply via email to

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