From f1014a4f33b67ccd15baff4d07fbb09f5660028b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 27 Apr 2010 12:11:31 +0200 Subject: 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 --- misc-utils/script.1 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'misc-utils/script.1') 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 -- cgit v1.2.3-55-g7522