summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-07-06 23:17:10 +0100
committerPádraig Brady <P@draigBrady.com>2011-07-08 11:23:08 +0100
commit4496c94091f8a6bc95fc1c0868eba632fae99ba3 (patch)
tree44e2b1a618a781abeb02a639387efcf6320abbed /doc/coreutils.texi
parent28a7fb52bc1160ffe1acac2e4fc3fa495d021ec4 (diff)
downloadcoreutils-4496c94091f8a6bc95fc1c0868eba632fae99ba3.tar.xz
timeout: add --foreground to support interactive commands
Or more accurately, commands not started from the shell prompt, that are interactive, or need to receive Ctrl-C etc. from the terminal. * doc/coreutils.texi (timeout invocation): Document --foreground. * src/timeout.c (main): Set the foreground flag and don't create a separate group. (cleanup): Only send a signal directly to the monitored command when the foreground flag is set. (usage): Describe --foreground. * tests/misc/timeout-group: Add a new test. * tests/Makefile.am: Reference new test. NEWS: Mention the new option. Reported by Shay Shimony Analysis by Alan Curry Fix suggested by Paul Eggert
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 1ab8a92e9..424446c25 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -15658,6 +15658,23 @@ The program accepts the following options. Also see @ref{Common options}.
Options must precede operands.
@table @samp
+@itemx --foreground
+@opindex --foreground
+Don't create a separate background program group, so that
+the managed @var{command} can use the foreground TTY normally.
+This is needed to support timing out commands not started
+directly from an interactive shell, in two situations.
+@enumerate
+@item
+@var{command} is interactive and needs to read from the terminal for example
+@item
+the user wants to support sending signals directly to @var{command}
+from the terminal (like Ctrl-C for example)
+@end enumerate
+
+Note in this mode of operation, any children of @var{command}
+will not be timed out.
+
@item -k @var{duration}
@itemx --kill-after=@var{duration}
@opindex -k