On Fri, Feb 25, 2005 at 10:11:54PM +1100, Herbert Xu wrote:
> On Fri, Feb 25, 2005 at 09:09:11PM +1100, herbert wrote:
> > 
> > Good catch.  We need to check whether the EXEVAL is thrown by a subshell
> > and if so relay it to the top.
> > 
> > Please try these two patches instead.
> 
> We need one more patch.  EXEVAL should not modify the exit status.

Hi Herbert, this does fine with the subshell.  Unfortunately I stumbled
across another problem with these patches as well as with the previous
single one.  After the EXEVAL exception is raised in the or list, dash
stops processing the script after a newline:

$ ./build-tmp/src/dash -exc '\
eval false || echo 0
echo 1
false
true'
+ eval false
+ false
+ echo 0
0
$ echo $?
0
$ 

$ echo false >t
$ ./build-tmp/src/dash -exc '\
. ./t || echo 0
echo 1
false
true'
+ . ./t
+ false
+ echo 0
0
$ echo $?
0
$ 

$ ./build-tmp/src/dash -exc '\
eval false || echo 0; echo 1
echo 2
false
true'
+ eval false
+ false
+ echo 0
0
+ echo 1
1
$ 

Regards, Gerrit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to