Fix environment passung to eval'ed commands.

PR:		bin/6577
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
Approved by:	silence amoung other sh experts
This commit is contained in:
Martin Cracauer 2000-05-15 12:33:17 +00:00
parent e6b52a8395
commit b2acf8878e
2 changed files with 2 additions and 1 deletions

View File

@ -850,6 +850,7 @@ evalcommand(cmd, flags, backcmd)
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
flushall();
cmddone:
cmdenviron = NULL;
out1 = &output;
out2 = &errout;
freestdout();

View File

@ -667,7 +667,7 @@ evalvar(p, flag)
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;