summaryrefslogtreecommitdiff
path: root/src/pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pwd.c')
-rw-r--r--src/pwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pwd.c b/src/pwd.c
index 13812220e..3642c9bd3 100644
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -66,6 +66,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS, usage);
@@ -77,7 +79,5 @@ main (int argc, char **argv)
error (1, errno, _("cannot get current directory"));
printf ("%s\n", wd);
- close_stdout ();
-
exit (0);
}