lib/exec_shell: (and pager) use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-02-01 15:38:24 +01:00
parent 3c29b695dd
commit 0f6adf8673
2 changed files with 2 additions and 2 deletions

View File

@ -46,5 +46,5 @@ void __attribute__((__noreturn__)) exec_shell(void)
strcpy(arg0 + 1, shell_basename);
execl(shell, arg0, NULL);
err(EXIT_FAILURE, _("failed to execute %s"), shell);
errexec(shell);
}

View File

@ -82,7 +82,7 @@ static int start_command(struct child_process *cmd)
cmd->preexec_cb();
execvp(cmd->argv[0], (char *const*) cmd->argv);
exit(127); /* cmd not found */
errexec(cmd->argv[0]);
}
if (cmd->pid < 0) {