summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/date.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/date.c b/src/date.c
index 2170899e4..d8c8f8aa4 100644
--- a/src/date.c
+++ b/src/date.c
@@ -191,7 +191,6 @@ the following modifiers between `%%' and a numeric directive.\n\
`_' (underscore) pad the field with spaces\n\
"));
puts (_("\nReport bugs to <bug-sh-utils@gnu.org>."));
- close_stdout_status (2);
}
exit (status);
}
@@ -320,6 +319,9 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ close_stdout_set_status (2);
+ atexit (close_stdout);
+
while ((optc = getopt_long (argc, argv, "d:f:I::r:Rs:u", long_options, NULL))
!= -1)
switch (optc)
@@ -464,8 +466,6 @@ argument must be a format string beginning with `+'."),
show_date (format, when);
}
- close_stdout_status (2);
-
exit (status);
}