From bbc88550db62ffe2cbdecd62c21252a941f8db36 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 19 Feb 2010 12:26:08 +0000 Subject: 27723: eval shouldn't modify non-zero return statuses --- ChangeLog | 7 ++++++- Src/builtin.c | 2 +- Test/D02glob.ztst | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56a1a79ee..41a4ecc2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-19 Peter Stephenson + + * 27723: Src/builtin.c, Test/D02glob.ztst: eval shouldn't + modify non-zero return statuses. + 2010-02-17 Peter Stephenson * Frank: 27717: Functions/VCS_Info/vcs_info_lastmsg: @@ -12774,5 +12779,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.4905 $ +* $Revision: 1.4906 $ ***************************************************** diff --git a/Src/builtin.c b/Src/builtin.c index 2a02c9a96..d293a7a78 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -4885,7 +4885,7 @@ eval(char **argv) } else { execode(prog, 1, 0); - if (errflag) + if (errflag && !lastval) lastval = errflag; } } else { diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index 84453ee5c..0aea26183 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -425,7 +425,7 @@ >/ [[:WORD:]] yes [[ foo = (#c0)foo ]] -1:Misplaced (#c...) flag +2:Misplaced (#c...) flag ?(eval):1: bad pattern: (#c0)foo mkdir glob.tmp/dir5 -- cgit v1.2.3-70-g09d2