Subject: bug#51128: timeout --kill-after=0 seems to not send a kill 0s after the initial signal

From: Pádraig Brady <[email-masked]>
Date: Mon, 11 Oct 2021 16:49:38 +0100

tag 51128 notabug
close 51128
stop

On 11/10/2021 02:28, Christoph Anton Mitterer wrote:
> Hey.
> 
> The timeout(1) manpage says:
>         -k, --kill-after=DURATION
>                also send a KILL signal if COMMAND is still running
>                this long after the initial signal was sent
> 
> My naive assumption would have been that --kill-after=0 means that a
> signal is sent immediately after the original one.

Well that wouldn't be that useful functionality,
as why not just send a single kill signal in that case.

> However, that doesn't seem to be the case.
> 
> 
> If intended, this should perhaps at least be mentioned in the manpage
> :-)

It is intended that a 0 duration disables that timeout.
It is mentioned in the full documentation at:
https://www.gnu.org/software/coreutils/timeout
The man pages don't try to document every nuance.

cheers,
Pádraig.