[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41634: 'timeout' returning 124 and 133
From: |
Bernhard Voelker |
Subject: |
bug#41634: 'timeout' returning 124 and 133 |
Date: |
Sun, 5 Jul 2020 01:25:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
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
Description: Text Data