svn commit: r230625 - stable/9/bin/sh

Jilles Tjoelker jilles at FreeBSD.org
Fri Jan 27 21:22:08 UTC 2012


Author: jilles
Date: Fri Jan 27 21:22:07 2012
New Revision: 230625
URL: http://svn.freebsd.org/changeset/base/230625

Log:
  MFC r228937: sh: Do not force special builtins non-special in optimized
  command substitition.
  
  This is not necessary: errors are already caught in evalbackcmd() and
  forcelocal handles changes to variables.
  
  Note that this depends on r223024.

Modified:
  stable/9/bin/sh/eval.c
Directory Properties:
  stable/9/bin/sh/   (props changed)

Modified: stable/9/bin/sh/eval.c
==============================================================================
--- stable/9/bin/sh/eval.c	Fri Jan 27 20:53:37 2012	(r230624)
+++ stable/9/bin/sh/eval.c	Fri Jan 27 21:22:07 2012	(r230625)
@@ -983,7 +983,6 @@ evalcommand(union node *cmd, int flags, 
 			memout.nextc = memout.buf;
 			memout.bufsize = 64;
 			mode |= REDIR_BACKQ;
-			cmdentry.special = 0;
 		}
 		savecmdname = commandname;
 		savetopfile = getcurrentfile();
@@ -1004,7 +1003,7 @@ evalcommand(union node *cmd, int flags, 
 		 * If there is no command word, redirection errors should
 		 * not be fatal but assignment errors should.
 		 */
-		if (argc == 0 && !(flags & EV_BACKCMD))
+		if (argc == 0)
 			cmdentry.special = 1;
 		listsetvar(cmdenviron, cmdentry.special ? 0 : VNOSET);
 		if (argc > 0)


More information about the svn-src-all mailing list