On 12/10/2021 02:21, Christoph Anton Mitterer wrote:
Hey.

One more thing on this, since I've just read through:
https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html#timeout-invocation

That does IMO *not* document the behaviour:

--kill-after=duration says:
This option has no effect if timeout’s duration is 0 which disables
the associated timeout.

But that's about the timeout from the command itself (i.e. the 1st non-
option argument), isn't it?

So it means that if I have:

timeout --kill-after=10 0 ./command

There won't be a KILL after 10s, since the duration itself is 0.

Right. That is the behavior.

There's no word about that --kill-after=0 disabling the KILL in the
duration != 0 case as in:
timeout --kill-after=0 10 ./command

Well DURATIONs of 0 were mentioned a little below that.
But it it worth clarifying in the option description itself.
So I'll make the following change:

-This option has no effect if @command{timeout}'s duration is 0 which
-disables the associated timeout.
+This option has no effect if either the main @var{duration}
+of the @command{timeout} command, or the @var{duration} specified
+to this option, is 0.

cheers,
Pádraig



Reply via email to