GNU bug report logs - #51135
timeout: --foreground causes exit status 124, even if KILL was used

Previous Next

Package: coreutils;

Reported by: Christoph Anton Mitterer <calestyo <at> scientia.net>

Date: Mon, 11 Oct 2021 18:02:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#51135: closed (timeout: --foreground causes exit status 124,
 even if KILL was used)
Date: Mon, 11 Oct 2021 21:05:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 11 Oct 2021 22:04:21 +0100
with message-id <f1cf9710-55c2-e9c7-df78-6a6959ab01d4 <at> draigBrady.com>
and subject line Re: bug#51135: timeout: --foreground causes exit status 124, even if KILL was used
has caused the debbugs.gnu.org bug report #51135,
regarding timeout: --foreground causes exit status 124, even if KILL was used
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
51135: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51135
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Christoph Anton Mitterer <calestyo <at> scientia.net>
To: bug-coreutils <at> gnu.org
Subject: timeout: --foreground causes exit status 124, even if KILL was used
Date: Mon, 11 Oct 2021 20:01:42 +0200
Hey.


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


I noticed that whenever --foreround 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 .


Thanks,
Chris.

btw: I'm sill on Debian sid's 8.32 version of coreutils.


[Message part 3 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Christoph Anton Mitterer <calestyo <at> scientia.net>,
 51135-done <at> debbugs.gnu.org
Subject: Re: bug#51135: timeout: --foreground causes exit status 124, even if
 KILL was used
Date: Mon, 11 Oct 2021 22:04:21 +0100
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


This bug report was last modified 3 years and 274 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.