summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorÁngel González <keisial@gmail.com>2012-10-29 00:36:08 +0000
committerPádraig Brady <P@draigBrady.com>2012-11-04 01:48:14 +0000
commitde2397fece839ce90f71e0624f5435755ad9ea01 (patch)
tree7fec66140c170279fa0de51e1ae747fa5a0a9ad3 /doc/coreutils.texi
parent8096ec664173f243e045be065203e6ad1aa1fa75 (diff)
downloadcoreutils-de2397fece839ce90f71e0624f5435755ad9ea01.tar.xz
timeout: add --preserve-status to always propagate the exit status
It's useful for commands that support running for an indeterminite amount of time, to not return a specific timeout exit status (124), and instead let the command handle the timeout signal and return a status for the work done so far. * doc/coreutils.texi (timeout invocation): Describe the new option. * src/timeout.c (preserve_status): A new global boolean to enable the --preserve-status behavior. (usage): Describe the new option. (main): Don't return EXIT_TIMEOUT of preserve_status is set. * tests/misc/timeout.sh: Add a test for the new option.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index e2b105912..767a31e9c 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -15890,6 +15890,12 @@ The program accepts the following options. Also see @ref{Common options}.
Options must precede operands.
@table @samp
+@item --preserve-status
+@opindex --preserve-status
+Return the exit status of the managed @var{command} on timeout, rather than
+a specific exit status indicating a timeout. This is useful if the
+managed @var{command} supports running for an indeterminite amount of time.
+
@item --foreground
@opindex --foreground
Don't create a separate background program group, so that