diff options
author | Karel Zak | 2018-02-01 15:38:24 +0100 |
---|---|---|
committer | Karel Zak | 2018-02-01 15:38:24 +0100 |
commit | 0f6adf8673037e7c2f41d00949165ede17aa148a (patch) | |
tree | c84f3428170dfe681f5ee3a8eb0ed83a22d3124d /lib | |
parent | su: use errexec() (diff) | |
download | kernel-qcow2-util-linux-0f6adf8673037e7c2f41d00949165ede17aa148a.tar.gz kernel-qcow2-util-linux-0f6adf8673037e7c2f41d00949165ede17aa148a.tar.xz kernel-qcow2-util-linux-0f6adf8673037e7c2f41d00949165ede17aa148a.zip |
lib/exec_shell: (and pager) use errexec()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exec_shell.c | 2 | ||||
-rw-r--r-- | lib/pager.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/exec_shell.c b/lib/exec_shell.c index b2f178add..49b7df5bf 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 4c0197f43..9740c711e 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) { |