summary refs log tree commit diff
path: root/bin/1sh/tests/builtins/wait3.0
diff options
context:
space:
mode:
Diffstat (limited to 'bin/1sh/tests/builtins/wait3.0')
-rw-r--r--bin/1sh/tests/builtins/wait3.021
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/1sh/tests/builtins/wait3.0 b/bin/1sh/tests/builtins/wait3.0
new file mode 100644
index 00000000..fd835b1b
--- /dev/null
+++ b/bin/1sh/tests/builtins/wait3.0
@@ -0,0 +1,21 @@
+# $FreeBSD: releng/12.1/bin/sh/tests/builtins/wait3.0 236771 2012-06-08 22:54:25Z jilles $
+
+failures=
+failure() {
+	echo "Error at line $1" >&2
+	failures=x$failures
+}
+
+T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
+trap 'rm -rf $T' 0
+cd $T || exit 3
+mkfifo fifo1
+for i in 1 2 3 4 5 6 7 8 9 10; do
+	exit $i 4<fifo1 &
+done
+exec 3>fifo1
+wait || failure $LINENO
+(${SH} -c echo >&3) 2>/dev/null && failure $LINENO
+wait || failure $LINENO
+
+test -z "$failures"