From: Karel Zak Date: Thu, 1 Feb 2018 14:41:23 +0000 (+0100) Subject: newgrp: use errexec() X-Git-Tag: v2.32-rc1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=856fcfd104607dad9dc77550af8f940d64bd97d6;p=thirdparty%2Futil-linux.git newgrp: use errexec() Signed-off-by: Karel Zak --- diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c index 7358ba1121..4538831480 100644 --- a/login-utils/newgrp.c +++ b/login-utils/newgrp.c @@ -236,8 +236,5 @@ int main(int argc, char *argv[]) shell = (pw_entry->pw_shell && *pw_entry->pw_shell ? pw_entry->pw_shell : _PATH_BSHELL); execl(shell, shell, (char *)0); - warn(_("failed to execute %s"), shell); - fflush(stderr); - - return EXIT_FAILURE; + errexec(shell); }