From f1628c32788039657e190b17a2ce0013c0a7892e Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Fri, 10 Oct 2008 09:55:34 +0000 Subject: 25140: improve error handling/reporting for here-document temp files. --- Src/exec.c | 5 +++-- 1 file 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); -- cgit 1.4.1