svn commit: r191009 - head/bin/sh

Stefan Farfeleder stefanf at FreeBSD.org
Mon Apr 13 19:10:57 UTC 2009


Author: stefanf
Date: Mon Apr 13 19:10:56 2009
New Revision: 191009
URL: http://svn.freebsd.org/changeset/base/191009

Log:
  Parse 'cmd1 && ! cmd2 | cmd3' correctly, the bang should apply to the entire
  pipeline cmd2 | cmd3 and not just cmd2.
  
  PR:		130298
  Submitted by:	Jilles Tjoelker

Modified:
  head/bin/sh/parser.c

Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c	Mon Apr 13 18:56:53 2009	(r191008)
+++ head/bin/sh/parser.c	Mon Apr 13 19:10:56 2009	(r191009)
@@ -250,6 +250,7 @@ pipeline(void)
 	int negate;
 
 	negate = 0;
+	checkkwd = 2;
 	TRACE(("pipeline: entered\n"));
 	while (readtoken() == TNOT)
 		negate = !negate;


More information about the svn-src-all mailing list