From 0f6adf8673037e7c2f41d00949165ede17aa148a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Feb 2018 15:38:24 +0100 Subject: [PATCH] lib/exec_shell: (and pager) use errexec() Signed-off-by: Karel Zak --- lib/exec_shell.c | 2 +- lib/pager.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/exec_shell.c b/lib/exec_shell.c index b2f178add2..49b7df5bfd 100644 --- a/lib/exec_shell.c +++ b/lib/exec_shell.c @@ -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); } diff --git a/lib/pager.c b/lib/pager.c index 4c0197f438..9740c711ea 100644 --- a/lib/pager.c +++ b/lib/pager.c @@ -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) { -- 2.47.3