Re: [PATCH 2/3] Revert Eliminated global exerrno.

2010-11-28 Thread Herbert Xu
On Wed, Oct 06, 2010 at 10:35:18PM -0500, Jonathan Nieder wrote: Maybe the following would make sense on top? -- 8 -- Subject: [EXCEPTIONS] Use EXEXIT in place of EXEXEC Patch applied. Thanks a lot! -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page:

Re: [PATCH 2/3] Revert Eliminated global exerrno.

2010-10-07 Thread Jonathan Nieder
Herbert Xu wrote: sh -c 'trap exec nosuchfile EXIT; exit 3'; echo $? This makes dash exit with 127 instead of 3 as it does now. AFAIK the wording of POSIX is such that we should return 3, however, it does seem that every other shell exits with 127. On 'exec': If exec is specified

Re: [PATCH 2/3] Revert Eliminated global exerrno.

2010-10-06 Thread Herbert Xu
On Wed, Oct 06, 2010 at 08:04:58PM -0500, Jonathan Nieder wrote: This reverts commit c0e07c010e5abdea1a7d1357edb1d08adac529cb. Yes, it is nicer to pass the exit status through the exitstatus global, but look at the consequences: $ sh -c 'exec nonexistent'; echo $? exec: 1: nonexistent:

Re: [PATCH 2/3] Revert Eliminated global exerrno.

2010-10-06 Thread Jonathan Nieder
Herbert Xu wrote: Actually the bug is elsewhere. It does bisect to there. :) But you're right, it would have been simpler to send one patch. --- a/src/eval.c +++ b/src/eval.c @@ -854,7 +854,7 @@ bail: int i; i = exception; -

Re: [PATCH 2/3] Revert Eliminated global exerrno.

2010-10-06 Thread Herbert Xu
On Wed, Oct 06, 2010 at 10:35:18PM -0500, Jonathan Nieder wrote: Herbert Xu wrote: Actually the bug is elsewhere. It does bisect to there. :) But you're right, it would have been simpler to send one patch. --- a/src/eval.c +++ b/src/eval.c @@ -854,7 +854,7 @@ bail:

Re: [PATCH 2/3] Revert Eliminated global exerrno.

2010-10-06 Thread Herbert Xu
On Thu, Oct 07, 2010 at 12:14:06PM +0800, Herbert Xu wrote: Let me run it through the tests and apply it. There is one problem with this and that is changing the exit status in a trap: sh -c 'trap exec nosuchfile EXIT; exit 3'; echo $? This makes dash exit with 127 instead of 3 as it