diff options
author | Karel Zak | 2010-04-27 12:11:31 +0200 |
---|---|---|
committer | Karel Zak | 2010-04-27 12:11:31 +0200 |
commit | f1014a4f33b67ccd15baff4d07fbb09f5660028b (patch) | |
tree | 1028e0916c0e9dacde8a9bf776015cd72a0289c5 /misc-utils/script.1 | |
parent | logger: add note about 'kern' to the man page (diff) | |
download | kernel-qcow2-util-linux-f1014a4f33b67ccd15baff4d07fbb09f5660028b.tar.gz kernel-qcow2-util-linux-f1014a4f33b67ccd15baff4d07fbb09f5660028b.tar.xz kernel-qcow2-util-linux-f1014a4f33b67ccd15baff4d07fbb09f5660028b.zip |
script: preserve child exit status
The patch also removes unnecessary detection of child process
existence (by kill()). This code was replaces with SIGCHLD
hold/release around fork().
Based on the patch from therealneworld@gmail.com.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/script.1')
-rw-r--r-- | misc-utils/script.1 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/misc-utils/script.1 b/misc-utils/script.1 index e017b63bc..24c6b5723 100644 --- a/misc-utils/script.1 +++ b/misc-utils/script.1 @@ -41,6 +41,7 @@ .Nm script .Op Fl a .Op Fl c Ar COMMAND +.Op Fl e .Op Fl f .Op Fl q .Op Fl t @@ -74,6 +75,9 @@ retaining the prior contents. Run the COMMAND rather than an interactive shell. This makes it easy for a script to capture the output of a program that behaves differently when its stdout is not a tty. +.It Fl e +Return the exit code of the child process. Uses the same format as bash +termination on signal termination exit code is 128+n. .It Fl f Flush output after each write. This is nice for telecooperation: One person does `mkfifo foo; script -f foo' and another can |