zsh-workers
 help / color / mirror / code / Atom feed
* Re: Problem with zkbd
       [not found]     ` <2d460de70806071303k4ed3bf76t20a4e7ff4135eb84@mail.gmail.com>
@ 2008-06-07 20:33       ` Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2008-06-07 20:33 UTC (permalink / raw)
  To: Richard Hartmann; +Cc: zsh-workers

On Jun 7, 10:03pm, Richard Hartmann wrote:
}
} > bash: cannot create temp file for here document: Permission denied
} 
} May I suggest changing the error message to be more verbose?

I think the reason it's not more verbose already is, given the way the
code is structured, it might be an error opening, writing, or closing
the file, and we don't know which.

However, we can probably fudge it in the same way bash seems to have.  In
fact, we should emit the error a bit sooner to prevent other possible
errors from changing errno.

Index: Src/exec.c
--- ../zsh-forge/current/Src/exec.c	2008-05-11 13:01:14.000000000 -0700
+++ Src/exec.c	2008-06-07 13:32:40.000000000 -0700
@@ -2736,10 +2736,11 @@
 		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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-09 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20080526214815.3f5dc00a@ate.itt.uni-stuttgart.de>
     [not found] ` <20080526220401.34c1061d@ate.itt.uni-stuttgart.de>
     [not found]   ` <080526140618.ZM8949@torch.brasslantern.com>
     [not found]     ` <2d460de70806071303k4ed3bf76t20a4e7ff4135eb84@mail.gmail.com>
2008-06-07 20:33       ` Problem with zkbd Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).