feedback: add the reason to the error message when forking fails

This makes all the "Could not fork" messages the same again
after the change in commit 3eff34b0 from yesterday.
This commit is contained in:
Benno Schulenberg 2020-08-01 11:34:23 +02:00
parent 0e1f7fe2ef
commit 731fd935ff
2 changed files with 4 additions and 3 deletions

View File

@ -986,7 +986,7 @@ bool execute_command(const char *command)
close(from_fd[1]);
if (pid_of_command == -1) {
statusline(ALERT, _("Could not fork"));
statusline(ALERT, _("Could not fork: %s"), strerror(errno));
close(from_fd[0]);
return FALSE;
}

View File

@ -2413,7 +2413,8 @@ const char *do_int_speller(const char *tempfile_name)
/* When some child process was not forked successfully... */
if (pid_spell < 0 || pid_sort < 0 || pid_uniq < 0) {
close(uniq_fd[0]);
return _("Could not fork");
statusline(ALERT, _("Could not fork: %s"), strerror(errno));
return NULL;
}
/* Get the system pipe buffer size. */
@ -2644,7 +2645,7 @@ void do_linter(void)
/* If the child process was not forked successfully... */
if (pid_lint < 0) {
close(lint_fd[0]);
statusline(ALERT, _("Could not fork"));
statusline(ALERT, _("Could not fork: %s"), strerror(errno));
return;
}