summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-12-28 22:10:12 +0000
committerjilles <jilles@FreeBSD.org>2011-12-28 22:10:12 +0000
commit45b77afcc17639dbfe86c501b193fa806331d521 (patch)
tree977ddfa175f22a2d8fcb7704bafd5cd1594467ff /bin/sh
parent7f817ed8c542dc264f729d233e3fd1f65675132b (diff)
downloadFreeBSD-src-45b77afcc17639dbfe86c501b193fa806331d521.zip
FreeBSD-src-45b77afcc17639dbfe86c501b193fa806331d521.tar.gz
sh: Do not force special builtins non-special in optimized command subst.
This is not necessary: errors are already caught in evalbackcmd() and forcelocal handles changes to variables. Note that this depends on r223024. MFC after: 4 weeks
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 5e42f79..e3b93a3 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -978,7 +978,6 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
memout.nextc = memout.buf;
memout.bufsize = 64;
mode |= REDIR_BACKQ;
- cmdentry.special = 0;
}
savecmdname = commandname;
savetopfile = getcurrentfile();
@@ -999,7 +998,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
* 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)
OpenPOWER on IntegriCloud