about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-09-13 09:37:49 +0100
committerPeter Stephenson <pws@zsh.org>2016-09-13 09:37:49 +0100
commit23c1c774b95861209fe97d1436b6563d5946f939 (patch)
tree4ebcbbe36615643ef65b97c75095d3b5e5edcb61
parent98581594b50d7b0c9fc3cb885028522b14a88304 (diff)
downloadzsh-23c1c774b95861209fe97d1436b6563d5946f939.tar.gz
zsh-23c1c774b95861209fe97d1436b6563d5946f939.tar.xz
zsh-23c1c774b95861209fe97d1436b6563d5946f939.zip
39305: Fix error handling after parse for here document.
Keep the error status the same as before, but also retain
the interrupt status if that was non-zero.
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6af28f976..145e9fbc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-13  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 39305: Src/exec.c: error handling on substitution for here
+	document was illogical.
+
 2016-09-12  Oliver Kiddle  <opk@zsh.org>
 
 	* 39295: Completion/Unix/Type/_remote_files: allow '--' to
diff --git a/Src/exec.c b/Src/exec.c
index 2e251b939..cfd633add 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4034,7 +4034,7 @@ gethere(char **strp, int typ)
 
 	parsestr(&buf);
 
-	if (!errflag) {
+	if (!(errflag & ERRFLAG_ERROR)) {
 	    /* Retain any user interrupt error */
 	    errflag = ef | (errflag & ERRFLAG_INT);
 	}