GNU bug report logs - #41634
'timeout' returning 124 and 133

Previous Next

Package: coreutils;

Reported by: Jonny Grant <jg <at> jguk.org>

Date: Sun, 31 May 2020 21:23:02 UTC

Severity: normal

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

Full log


Message #49 received at 41634-done <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Jonny Grant <jg <at> jguk.org>, Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 41634-done <at> debbugs.gnu.org
Subject: Re: bug#41634: 'timeout' returning 124 and 133
Date: Sun, 5 Jul 2020 01:25:25 +0200
[Message part 1 (text/plain, inline)]
On 2020-07-04 00:57, Jonny Grant wrote:
> May I ask if that exit status 137 could be clarified as 128+9, where 9 is
> the KILL signal number in this example please. I've pasted a patch below.

Thanks for the patch - this is always a great basis for discussions.

Well, this 128+9 arithmetic is explained just a couple of lines above,
i.e., where all the value for the exit status are described.
So adding it here again looks like repetition to me.

> Another question, for me it wasn't clear that the "-k 3s" was cumulative
> with the duration 5, so the total being 8. I thought both durations
> both counted from when the command was invoked.
> 
> https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html#timeout-invocation
> ‘-k duration’
> ‘--kill-after=duration’
> Ensure the monitored command is killed by also sending a ‘KILL’ signal,
> after the specified duration. Without this option, if the selected signal
> proves not to be fatal, timeout does not kill the command.
> 
> Could this be clarified as "after the existing duration is added to
> this specified duration, cumulatively from when the command is invoked."?
> I can make another patch if this would be fine, and my understanding is correct.

Good catch, this is only documented in --help output (and therefore in timeout.1):

  -k, --kill-after=DURATION
                 also send a KILL signal if COMMAND is still running
                   this long after the initial signal was sent

What about the attached?

Thanks & have a nice day,
Berny
[0001-doc-clarify-timeout-k-behavior.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 294 days ago.

Previous Next


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