]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: clarify 'timeout -k' behavior
authorBernhard Voelker <mail@bernhard-voelker.de>
Sat, 4 Jul 2020 23:20:10 +0000 (01:20 +0200)
committerBernhard Voelker <mail@bernhard-voelker.de>
Mon, 20 Jul 2020 20:02:02 +0000 (22:02 +0200)
* doc/coreutils.texi (timeout invocation): Document that the the
duration of --kill-after=DURATION begins when sending the initial
signal.  Also mention that -k does not have any effect if timeout's
duration is 0.

Suggested by Jonny Grant <jg@jguk.org>.

doc/coreutils.texi

index 656b8bc791603c3788e40d34f51562d1a23bd88c..15514f1bf3351cb1a108333e78ca6a15fe8ea1af 100644 (file)
@@ -18107,9 +18107,19 @@ themselves (like GDB for example).
 @opindex -k
 @opindex --kill-after
 Ensure the monitored @var{command} is killed by also sending a @samp{KILL}
-signal, after the specified @var{duration}.  Without this option, if the
-selected signal proves not to be fatal, @command{timeout} does not kill
-the @var{command}.
+signal.
+
+The specified @var{duration} starts from the point in time when
+@command{timeout} sends the initial signal to @var{command}, i.e.,
+not from the beginning when the @var{command} is started.
+
+This option has no effect if @command{timeout}'s duration is 0 which
+disables the associated timeout.
+
+This option may be useful if the selected signal did not kill the @var{command},
+either because the signal was blocked or ignored, or if the @var{command} takes
+too long (e.g. for cleanup work) to terminate itself within a certain amount
+of time.
 
 @item -s @var{signal}
 @itemx --signal=@var{signal}