diff options
author | cracauer <cracauer@FreeBSD.org> | 2000-05-15 12:33:17 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 2000-05-15 12:33:17 +0000 |
commit | 31c479dcd85f2b95f5deb1650f3af4195737f3d6 (patch) | |
tree | d71afa6658d3d40a2067a378c42cfc1cf62cce7e | |
parent | ba88d2df45087e22147de6c07971f9ac1e861343 (diff) | |
download | FreeBSD-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
-rw-r--r-- | bin/sh/eval.c | 1 | ||||
-rw-r--r-- | bin/sh/expand.c | 2 |
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; |