1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-30 20:40:08 +02:00

doc: timeout --foreground: add clarification on exit status

* doc/coreutils.texi (timeout invocation): Add detail on
how --foreground allows timeout(1) to use more standard
exit status as the uncatchable SIGKILL is not sent to itself.
Fixes https://bugs.gnu.org/51135
This commit is contained in:
Pádraig Brady
2021-10-11 22:04:38 +01:00
parent 6cafb122fa
commit d085678bd6
+4 -1
View File
@@ -18321,11 +18321,14 @@ Exit status:
the exit status of @var{command} otherwise
@end display
In case of the @samp{KILL(9)} signal, @command{timeout} returns with
In the case of the @samp{KILL(9)} signal, @command{timeout} returns with
exit status 137, regardless of whether that signal is sent to @var{command}
or to @command{timeout} itself, i.e., these cases cannot be distinguished.
In the latter case, the @var{command} process may still be alive after
@command{timeout} has forcefully been terminated.
However if the @option{--foreground} option is specified then
@command{timeout} will not send any signals to its own process,
and so it will exit with one of the other exit status values detailed above.
Examples: