summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>2000-05-15 12:33:17 +0000
committercracauer <cracauer@FreeBSD.org>2000-05-15 12:33:17 +0000
commit31c479dcd85f2b95f5deb1650f3af4195737f3d6 (patch)
treed71afa6658d3d40a2067a378c42cfc1cf62cce7e /bin/sh
parentba88d2df45087e22147de6c07971f9ac1e861343 (diff)
downloadFreeBSD-src-31c479dcd85f2b95f5deb1650f3af4195737f3d6.zip
FreeBSD-src-31c479dcd85f2b95f5deb1650f3af4195737f3d6.tar.gz
Fix environment passung to eval'ed commands.
PR: bin/6577 Submitted by: Anatoly Vorobey <mellon@pobox.com> Approved by: silence amoung other sh experts
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/eval.c1
-rw-r--r--bin/sh/expand.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 33dec0e..dabc7e6 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -850,6 +850,7 @@ evalcommand(cmd, flags, backcmd)
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
flushall();
cmddone:
+ cmdenviron = NULL;
out1 = &output;
out2 = &errout;
freestdout();
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 00c5f09..d82f459 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -667,7 +667,7 @@ again: /* jump here after setting a variable with ${var=text} */
set = varisset(var, varflags & VSNUL);
val = NULL;
} else {
- val = lookupvar(var);
+ val = bltinlookup(var, 1);
if (val == NULL || ((varflags & VSNUL) && val[0] == '\0')) {
val = NULL;
set = 0;
OpenPOWER on IntegriCloud