[EVAL] Do not clobber exitstatus in evalcommand
commit 0d1fb088a4a16569260de4266d4bd359491c6bcd Author: Herbert Xu herb...@gondor.apana.org.au Date: Fri Oct 3 14:07:07 2014 +0800 [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 herb...@gondor.apana.org.au diff --git a/ChangeLog b/ChangeLog index 9a601df..4dc8fa3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-10-03 Herbert Xu herb...@gondor.apana.org.au + + * Do not clobber exitstatus in evalcommand. + 2014-10-02 Herbert Xu herb...@gondor.apana.org.au * Fix use-after-free in dotrap/evalstring. diff --git a/src/eval.c b/src/eval.c index 0708bf5..3f4d957 100644 --- a/src/eval.c +++ b/src/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); Cheers, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe dash in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Support DOS paths in dash
Edward Lam edw...@sidefx.com wrote: On Oct 1, 2014, at 8:41 PM, Herbert Xu herb...@gondor.apana.org.au wrote: Eric Blake ebl...@redhat.com wrote: I'm not interested in burdening the cygwin build of dash with a one-off patch, so I'd like to gauge the upstream thoughts - is it worth including platform-specific patches like this (no penalty to build size of non-cygwin platforms, and on cygwin, it allows 'cd c:/' to behave as shorthand for 'cd /cygdrive/c/')? If the patch lands in dash.git, then I'll rebuild the cygwin port of dash to include a backport (rather than waiting for 0.5.9 to be released). If there is no interest, I'd rather just drop the patch. The cygwin community already states that /cygdrive/c notation is the official way to access drive letters, and that if 'c:/' works it is nice, but it is not a design goal to always have it work. It's fine by me. Is that a yes to allow platform-specific patches into dash? If there is zero impact on other platforms and it doesn't adversely impact the maintainability then yes. Cheers, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line unsubscribe dash in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html