Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2010 20:26:50 +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: r211467 - head/tools/regression/bin/sh/builtins
Message-ID:  <201008182026.o7IKQoVb079525@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Wed Aug 18 20:26:50 2010
New Revision: 211467
URL: http://svn.freebsd.org/changeset/base/211467

Log:
  sh: Add a test for break from a trap action.

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

Added: head/tools/regression/bin/sh/builtins/break2.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/break2.0	Wed Aug 18 20:26:50 2010	(r211467)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+# It is not immediately obvious that this should work, and someone probably
+# relies on it.
+
+while :; do
+	trap 'break' USR1
+	kill -USR1 $$
+	echo bad
+	exit 1
+done
+echo good

Added: head/tools/regression/bin/sh/builtins/break2.0.stdout
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/break2.0.stdout	Wed Aug 18 20:26:50 2010	(r211467)
@@ -0,0 +1 @@
+good



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