]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/exec_shell: (and pager) use errexec()
authorKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2018 14:38:24 +0000 (15:38 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2018 14:38:24 +0000 (15:38 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/exec_shell.c
lib/pager.c

index b2f178add285ff86d4db34f89901f67cf9e3117d..49b7df5bfde93c039ae14d0f0f0a7f63d460cff1 100644 (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);
 }
index 4c0197f43848b130b9e41c6ed6ff4d72ad123293..9740c711ea97ddc84aa0a3fa1f3a45d9fa7f4dfb 100644 (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) {