about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 5cc92b548..47c0184aa 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2812,10 +2812,11 @@ execcmd(Estate state, int input, int output, int how, int last1)
 		else
 		    fil = getherestr(fn);
 		if (fil == -1) {
+		    if (errno && errno != EINTR)
+			zwarn("can't create temp file for here document: %e",
+			      errno);
 		    closemnodes(mfds);
 		    fixfds(save);
-		    if (errno && errno != EINTR)
-			zwarn("%e", errno);
 		    execerr();
 		}
 		addfd(forked, save, mfds, fn->fd1, fil, 0, fn->varid);