svn commit: r236771 - head/tools/regression/bin/sh/builtins
Jilles Tjoelker
jilles at FreeBSD.org
Fri Jun 8 22:54:26 UTC 2012
Author: jilles
Date: Fri Jun 8 22:54:25 2012
New Revision: 236771
URL: http://svn.freebsd.org/changeset/base/236771
Log:
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.
Modified:
head/tools/regression/bin/sh/builtins/wait3.0
Modified: head/tools/regression/bin/sh/builtins/wait3.0
==============================================================================
--- head/tools/regression/bin/sh/builtins/wait3.0 Fri Jun 8 21:58:51 2012 (r236770)
+++ head/tools/regression/bin/sh/builtins/wait3.0 Fri Jun 8 22:54:25 2012 (r236771)
@@ -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"
More information about the svn-src-all
mailing list