GNU bug report logs - #70219
Bug/Issue with timeout and signals

Previous Next

Package: coreutils;

Reported by: "Branden R. Williams" <brw <at> brandenwilliams.com>

Date: Fri, 5 Apr 2024 18:01:03 UTC

Severity: normal

Tags: notabug

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: Pádraig Brady <P <at> draigBrady.com>
To: "Branden R. Williams" <brw <at> brandenwilliams.com>
Cc: 70219 <at> debbugs.gnu.org
Subject: bug#70219: Bug/Issue with timeout and signals
Date: Sat, 6 Apr 2024 19:30:08 +0100
tag 70219 notabug
close 70219
stop

On 06/04/2024 16:50, Branden R. Williams via GNU coreutils Bug Reports wrote:
>    -k, --kill-after=DURATION
>                   also send a KILL signal if COMMAND is still running
>                     this long after the initial signal was sent

If you read the above carefully, please note the words _also_ and _initial_.
I.e. -k will cause _another_ signal to be sent, iff the first doesn't terminate the command.

Hopefully this example with all pertinent options explains things.
I.e. the first signal sent after 1s is ignored,
and the second kill signal sent after another 2s forcefully kills the command.

  $ date +%s; timeout -k 2s -s0 1s sleep inf; date +%s
  1712427916
  Killed
  1712427919

cheers,
Pádraig




This bug report was last modified 1 year and 46 days ago.

Previous Next


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