Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2010 21:15:06 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215547 - head/tools/regression/bin/sh/builtins
Message-ID:  <201011192115.oAJLF6d1089743@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Fri Nov 19 21:15:06 2010
New Revision: 215547
URL: http://svn.freebsd.org/changeset/base/215547

Log:
  sh: Add another simple test for the wait builtin.

Added:
  head/tools/regression/bin/sh/builtins/wait3.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/wait3.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/wait3.0	Fri Nov 19 21:15:06 2010	(r215547)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+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
+(echo >&3) 2>/dev/null && failure $LINENO
+wait || failure $LINENO
+
+test -z "$failures"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011192115.oAJLF6d1089743>