klibc-bot for Herbert Xu
2019-Jan-25 03:15 UTC
[klibc] [klibc:update-dash] [EVAL] Do not clobber exitstatus in evalcommand
Commit-ID: 1fc5f5a5a8704d47b71b01cc0ab734a4d2976d37 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=1fc5f5a5a8704d47b71b01cc0ab734a4d2976d37 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Fri, 3 Oct 2014 14:07:07 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] [EVAL] Do not clobber exitstatus in evalcommand All originators of EXERROR have been setting the exitstatus for a while now. So it is no longer appropriate to set it explicitly in evalcommand. In fact doing so may cause the original exitstatus to be lost. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/eval.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 501d47fe..b384cb82 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -853,12 +853,9 @@ bail: listsetvar(varlist.list, VEXPORT); } if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { - if (exception == EXERROR) { - exitstatus = 2; - if (spclbltin <= 0) { - FORCEINTON; - break; - } + if (exception == EXERROR && spclbltin <= 0) { + FORCEINTON; + break; } raise: longjmp(handler->loc, 1);
Seemingly Similar Threads
- [klibc:update-dash] dash: [EVAL] Do not clobber exitstatus in evalcommand
- [klibc:update-dash] [ERROR] Set exitstatus in onint
- [klibc:update-dash] dash: [ERROR] Set exitstatus in onint
- [klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
- [klibc:update-dash] jobs - Do not block when waiting on SIGCHLD