diff options
author | jilles <jilles@FreeBSD.org> | 2012-06-08 22:54:25 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-06-08 22:54:25 +0000 |
commit | ccb8c35eab6b0cfd93a0939fbf01b0d77682dd41 (patch) | |
tree | e69912720e97e5f4d905b77e3055bdcf733bc8fa /tools/regression | |
parent | be453f58c1eab09996cfd89e3d5932cabb6581a0 (diff) | |
download | FreeBSD-src-ccb8c35eab6b0cfd93a0939fbf01b0d77682dd41.zip FreeBSD-src-ccb8c35eab6b0cfd93a0939fbf01b0d77682dd41.tar.gz |
sh: Do not assume that SIGPIPE will only kill a subshell in builtins/wait3.0
test.
POSIX says that SIGPIPE affects a process and therefore a SIGPIPE caused and
received by a subshell environment may or may not affect the parent shell
environment.
The change assumes that ${SH} is executed in a new process. This must be the
case if it contains a slash and everyone appears to do so anyway even though
POSIX might permit otherwise.
This change makes builtins/wait3.0 work in ksh93.
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/bin/sh/builtins/wait3.0 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/regression/bin/sh/builtins/wait3.0 b/tools/regression/bin/sh/builtins/wait3.0 index d4eb250..1ed5299 100644 --- a/tools/regression/bin/sh/builtins/wait3.0 +++ b/tools/regression/bin/sh/builtins/wait3.0 @@ -15,7 +15,7 @@ for i in 1 2 3 4 5 6 7 8 9 10; do done exec 3>fifo1 wait || failure $LINENO -(echo >&3) 2>/dev/null && failure $LINENO +(${SH} -c echo >&3) 2>/dev/null && failure $LINENO wait || failure $LINENO test -z "$failures" |