diff options
author | stefanf <stefanf@FreeBSD.org> | 2009-05-31 12:36:14 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2009-05-31 12:36:14 +0000 |
commit | 08e3c7d596923f5022fda6ee58d6e7ac15e65edb (patch) | |
tree | 84ae7f42c94dccd7867ba1799d70fb266b79ea38 /bin/sh/histedit.c | |
parent | 6fb0275352a53e468de58a1124fc5b35e9234143 (diff) | |
download | FreeBSD-src-08e3c7d596923f5022fda6ee58d6e7ac15e65edb.zip FreeBSD-src-08e3c7d596923f5022fda6ee58d6e7ac15e65edb.tar.gz |
Fix the eval command in combination with set -e. Before this change the shell
would always terminate if eval returned with a non-zero exit status regardless
if the status was actually tested. Unfortunately a new file-scope variable
is needed, the alternative would only be to add a new parameter to all
built-ins.
PR: 134881
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r-- | bin/sh/histedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 0bea2b8..5698a8f 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -350,7 +350,7 @@ histcmd(int argc, char **argv) if (displayhist) { out2str(s); } - evalstring(s); + evalstring(s, 0); if (displayhist && hist) { /* * XXX what about recursive and @@ -382,7 +382,7 @@ histcmd(int argc, char **argv) fclose(efp); editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); sprintf(editcmd, "%s %s", editor, editfile); - evalstring(editcmd); /* XXX - should use no JC command */ + evalstring(editcmd, 0); /* XXX - should use no JC command */ INTON; readcmdfile(editfile); /* XXX - should read back - quick tst */ unlink(editfile); |