commit dbdf38cce503ce7ea64ff6523727a9cd6853c4ee
parent 47770bd321c7034f7c5f6a7306cfc93865c96a3a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 28 May 2019 17:36:32 +0200
tweaks: consistently report failures to fork (and the like) as errors
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -949,7 +949,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)) {
- statusbar(_("Could not create pipe"));
+ statusline(ALERT, _("Could not create pipe"));
return FALSE;
}
@@ -985,7 +985,7 @@ bool execute_command(const char *command)
close(from_fd[1]);
if (pid_of_command == -1) {
- statusbar(_("Could not fork"));
+ statusline(ALERT, _("Could not fork"));
close(from_fd[0]);
return FALSE;
}
@@ -2720,7 +2720,7 @@ void do_linter(void)
/* Create a pipe up front. */
if (pipe(lint_fd) == -1) {
- statusbar(_("Could not create pipe"));
+ statusline(ALERT, _("Could not create pipe"));
return;
}
@@ -2757,7 +2757,7 @@ void do_linter(void)
/* If the child process was not forked successfully... */
if (pid_lint < 0) {
close(lint_fd[0]);
- statusbar(_("Could not fork"));
+ statusline(ALERT, _("Could not fork"));
return;
}
@@ -2766,7 +2766,7 @@ void do_linter(void)
if (pipesize < 1) {
close(lint_fd[0]);
- statusbar(_("Could not get size of pipe buffer"));
+ statusline(ALERT, _("Could not get size of pipe buffer"));
return;
}