commit d7c2b98ead4368611d66a86d67ec947ddfd5c0f4
parent 4c63ef204d86d9bfd91bb740a4061d4c9ad9b950
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 6 Aug 2020 08:40:17 +0200
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.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -951,7 +951,7 @@ bool execute_command(const char *command)
/* Create a pipe to read the command's output from, and, if needed,
* a pipe to feed the command's input through. */
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;
}
diff --git a/src/text.c b/src/text.c
@@ -2340,7 +2340,7 @@ void do_int_speller(const char *tempfile_name)
/* Create all three pipes up front. */
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;
}
@@ -2607,7 +2607,7 @@ void do_linter(void)
/* Create a pipe up front. */
if (pipe(lint_fd) == -1) {
- statusline(ALERT, _("Could not create pipe"));
+ statusline(ALERT, _("Could not create pipe: %s"), strerror(errno));
return;
}