setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- atexit(close_stdout);
+ close_stdout_atexit();
while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
switch (ch) {
case 'V':
- printf(UTIL_LINUX_VERSION);
- return EXIT_SUCCESS;
+ print_version(EXIT_SUCCESS);
case 'h':
usage();
default:
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);
}