Message ID | 5663058B.1030809@gigawatt.nl (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
diff --git a/src/eval.c b/src/eval.c index 071fb1b..46689ef 100644 --- a/src/eval.c +++ b/src/eval.c @@ -172,7 +172,7 @@ evalstring(char *s, int flags) status = 0; while ((n = parsecmd(0)) != NEOF) { evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT)); - status = exitstatus; + if (n) status = exitstatus; popstackmark(&smark); if (evalskip) break; diff --git a/src/main.c b/src/main.c index bedb663..1b301fa 100644 --- a/src/main.c +++ b/src/main.c @@ -228,7 +228,7 @@ cmdloop(int top) job_warning = (job_warning == 2) ? 1 : 0; numeof = 0; evaltree(n, 0); - status = exitstatus; + if (n) status = exitstatus; } popstackmark(&smark);