feedback: when creating a pipe fails, report also the reason
After commit 59bbc0b8
from five days ago (that made a divergent pipe
failure to be treated in the same way as the other two), this became
possible without having two different pipe-failure messages.
master
parent
4c63ef204d
commit
d7c2b98ead
|
@ -951,7 +951,7 @@ bool execute_command(const char *command)
|
||||||
/* Create a pipe to read the command's output from, and, if needed,
|
/* Create a pipe to read the command's output from, and, if needed,
|
||||||
* a pipe to feed the command's input through. */
|
* a pipe to feed the command's input through. */
|
||||||
if (pipe(from_fd) == -1 || (should_pipe && pipe(to_fd) == -1)) {
|
if (pipe(from_fd) == -1 || (should_pipe && pipe(to_fd) == -1)) {
|
||||||
statusline(ALERT, _("Could not create pipe"));
|
statusline(ALERT, _("Could not create pipe: %s"), strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2340,7 +2340,7 @@ void do_int_speller(const char *tempfile_name)
|
||||||
|
|
||||||
/* Create all three pipes up front. */
|
/* Create all three pipes up front. */
|
||||||
if (pipe(spell_fd) == -1 || pipe(sort_fd) == -1 || pipe(uniq_fd) == -1) {
|
if (pipe(spell_fd) == -1 || pipe(sort_fd) == -1 || pipe(uniq_fd) == -1) {
|
||||||
statusline(ALERT, _("Could not create pipe"));
|
statusline(ALERT, _("Could not create pipe: %s"), strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2607,7 +2607,7 @@ void do_linter(void)
|
||||||
|
|
||||||
/* Create a pipe up front. */
|
/* Create a pipe up front. */
|
||||||
if (pipe(lint_fd) == -1) {
|
if (pipe(lint_fd) == -1) {
|
||||||
statusline(ALERT, _("Could not create pipe"));
|
statusline(ALERT, _("Could not create pipe: %s"), strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue