svn commit: r222676 - in head: bin/sh
tools/regression/bin/sh/execution
Jilles Tjoelker
jilles at FreeBSD.org
Sat Jun 4 11:28:42 UTC 2011
Author: jilles
Date: Sat Jun 4 11:28:42 2011
New Revision: 222676
URL: http://svn.freebsd.org/changeset/base/222676
Log:
sh: Honour -n while processing -c string.
Added:
head/tools/regression/bin/sh/execution/set-n4.0 (contents, props changed)
Modified:
head/bin/sh/eval.c
Modified: head/bin/sh/eval.c
==============================================================================
--- head/bin/sh/eval.c Sat Jun 4 09:25:59 2011 (r222675)
+++ head/bin/sh/eval.c Sat Jun 4 11:28:42 2011 (r222676)
@@ -165,7 +165,7 @@ evalstring(char *s, int flags)
setstackmark(&smark);
setinputstring(s, 1);
while ((n = parsecmd(0)) != NEOF) {
- if (n != NULL) {
+ if (n != NULL && !nflag) {
if (flags_exit && preadateof())
evaltree(n, flags | EV_EXIT);
else
Added: head/tools/regression/bin/sh/execution/set-n4.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/set-n4.0 Sat Jun 4 11:28:42 2011 (r222676)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+$SH -nc 'echo bad'
More information about the svn-src-all
mailing list