The first patch sent with the bug report did not allow script to fail in
the case where the forked command did not exit normally, which makes it
of little use if one really needs to detect a failure.

I join two patches, only one of which can be applied (the second is richer
in features):
 * both patches will make 'script -e' return the exit status of the forked
   command (if there is one)
 * both patches will make 'script -ee' fail if the forked command does not
   exit normally (for example if it is killed)
 * one patch will furthermore make 'script -eee' raise the same signal
   that killed the forked command, so that script wraps the forked command
   transparently; for example this will make an interactive shell report
   the error associated with the signal that killed the forked command

This a request for upstream, but it can be applied in Debian only since
the change is backward compatible (the behaviour changes only if the -e
option is given), and it can be reviewed by the Debian maintainer before
being possibly submitted upstream.

Regards

Attachment: util-linux-2.17.2_script-ee.20120213.patch
Description: Attachment: util-linux-2.17.2_script-ee.20120213.patch

Attachment: util-linux-2.17.2_script-eee.20120213.patch
Description: Attachment: util-linux-2.17.2_script-eee.20120213.patch

Reply via email to