diff options
author | jilles <jilles@FreeBSD.org> | 2013-07-12 15:29:41 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-07-12 15:29:41 +0000 |
commit | e87e084ab729c231e686628c43d037232a4aa81e (patch) | |
tree | cf889572ab9e60f57634f30de86f53f611365ca9 /tools | |
parent | de0b6f6b4c63f1aa9296e17bf5e33093a2dca481 (diff) | |
download | FreeBSD-src-e87e084ab729c231e686628c43d037232a4aa81e.zip FreeBSD-src-e87e084ab729c231e686628c43d037232a4aa81e.tar.gz |
sh: Do not read from stdin if an error occurs during -i -c cmd.
Although using -i with -c does not seem very useful, it seems inappropriate
to read commands from the terminal in this case.
Side effect: if the -s -c extension is used and the -s option is turned off
using 'set +s' during the interactive part, the shell now exits after an
error or interrupt. Note that POSIX only specifies -s as option to sh, not
to set.
See also Austin Group issue #718.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/bin/sh/execution/int-cmd1.0 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/execution/int-cmd1.0 b/tools/regression/bin/sh/execution/int-cmd1.0 new file mode 100644 index 0000000..a1f097b --- /dev/null +++ b/tools/regression/bin/sh/execution/int-cmd1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ + +! echo echo bad | $SH -ic 'fi' 2>/dev/null |