about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2013-10-18 23:42:07 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2013-10-18 23:42:07 +0100
commit8879c46a4897a0e347455334fc6b6732c203a220 (patch)
tree94c33c793980750dc5be3ca79a39e0675d0461ce
parent87c482d751b9c8211974352139cf7fedb9797f5f (diff)
downloadzsh-8879c46a4897a0e347455334fc6b6732c203a220.tar.gz
zsh-8879c46a4897a0e347455334fc6b6732c203a220.tar.xz
zsh-8879c46a4897a0e347455334fc6b6732c203a220.zip
31846: fix NOEXEC option in execsimple() optimisation
-rw-r--r--ChangeLog4
-rw-r--r--Src/exec.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 84fa900ee..30f1742a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-18  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 31846: Src/exec.c: fix NOEXEC option in execsimple().
+
 2013-10-18  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 31840: Completion/Unix/Command/_make: "read" used wrong $IFS
diff --git a/Src/exec.c b/Src/exec.c
index 8efbbd40c..e95cad300 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1087,6 +1087,9 @@ execsimple(Estate state)
     if (errflag)
 	return (lastval = 1);
 
+    if (!isset(EXECOPT))
+	return lastval = 0;
+
     /* In evaluated traps, don't modify the line number. */
     if (!IN_EVAL_TRAP() && !ineval && code)
 	lineno = code - 1;