]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
vipw: use errexec()
authorKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2018 14:41:42 +0000 (15:41 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Feb 2018 14:41:42 +0000 (15:41 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/vipw.c

index 9b7696942793d4249c33674448ba503d77275245..2502fcb4eab540814ce6c5d3dd9f8f4102d7d01c 100644 (file)
@@ -209,8 +209,7 @@ static void pw_edit(void)
 
        if (!pid) {
                execlp(editor, p, tmp_file, NULL);
-               /* Shouldn't get here */
-               _exit(EXIT_FAILURE);
+               errexec(editor);
        }
        for (;;) {
                pid = waitpid(pid, &pstat, WUNTRACED);