Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with zkbd
- X-seq: zsh-workers 25140
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- Subject: Re: Problem with zkbd
- Date: Sat, 07 Jun 2008 13:33:42 -0700
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <2d460de70806071303k4ed3bf76t20a4e7ff4135eb84@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080526214815.3f5dc00a@xxxxxxxxxxxxxxxxxxxxxxxx> <20080526220401.34c1061d@xxxxxxxxxxxxxxxxxxxxxxxx> <080526140618.ZM8949@xxxxxxxxxxxxxxxxxxxxxx> <2d460de70806071303k4ed3bf76t20a4e7ff4135eb84@xxxxxxxxxxxxxx>
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);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author