summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/builtin.c2
-rw-r--r--Test/D02glob.ztst2
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 <pws@csr.com>
+
+ * 27723: Src/builtin.c, Test/D02glob.ztst: eval shouldn't
+ modify non-zero return statuses.
+
2010-02-17 Peter Stephenson <pws@csr.com>
* 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