1
1

tweaks: consistently report failures to fork (and the like) as errors

Этот коммит содержится в:
Benno Schulenberg 2019-05-28 17:36:32 +02:00
родитель 47770bd321
Коммит dbdf38cce5

Просмотреть файл

@ -949,7 +949,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)) {
statusbar(_("Could not create pipe")); statusline(ALERT, _("Could not create pipe"));
return FALSE; return FALSE;
} }
@ -985,7 +985,7 @@ bool execute_command(const char *command)
close(from_fd[1]); close(from_fd[1]);
if (pid_of_command == -1) { if (pid_of_command == -1) {
statusbar(_("Could not fork")); statusline(ALERT, _("Could not fork"));
close(from_fd[0]); close(from_fd[0]);
return FALSE; return FALSE;
} }
@ -2720,7 +2720,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) {
statusbar(_("Could not create pipe")); statusline(ALERT, _("Could not create pipe"));
return; return;
} }
@ -2757,7 +2757,7 @@ void do_linter(void)
/* If the child process was not forked successfully... */ /* If the child process was not forked successfully... */
if (pid_lint < 0) { if (pid_lint < 0) {
close(lint_fd[0]); close(lint_fd[0]);
statusbar(_("Could not fork")); statusline(ALERT, _("Could not fork"));
return; return;
} }
@ -2766,7 +2766,7 @@ void do_linter(void)
if (pipesize < 1) { if (pipesize < 1) {
close(lint_fd[0]); close(lint_fd[0]);
statusbar(_("Could not get size of pipe buffer")); statusline(ALERT, _("Could not get size of pipe buffer"));
return; return;
} }