diff options
author | Jim Meyering <jim@meyering.net> | 2000-05-11 07:23:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-05-11 07:23:42 +0000 |
commit | 5a3d9df9a1dba883bb662591e4a638158f6db678 (patch) | |
tree | 6f939045fc78c4c61b71eaca6161dfa238a28e79 /src/date.c | |
parent | 70e5178bdeaee9c81cbe752a25408c0b867757b8 (diff) | |
download | coreutils-5a3d9df9a1dba883bb662591e4a638158f6db678.tar.xz |
(usage): Don't call close_stdout_status directly,
since that didn't cover --version output.
(main): Instead, call close_stdout_set_status and arrange to
call close_stdout via atexit.
Diffstat (limited to 'src/date.c')
-rw-r--r-- | src/date.c | 6 |
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); } |