diff options
author | Jim Meyering <jim@meyering.net> | 2000-05-11 07:21:33 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-05-11 07:21:33 +0000 |
commit | 70e5178bdeaee9c81cbe752a25408c0b867757b8 (patch) | |
tree | c6b5543abcbf036ee28774b02b8eb5ab85e39505 /src/yes.c | |
parent | c693c5940bb56c7c8a1a4521c2944a079c2ca8f6 (diff) | |
download | coreutils-70e5178bdeaee9c81cbe752a25408c0b867757b8.tar.xz |
(usage): Don't call close_stdout directly, since that
didn't cover --version output.
(main): Arrange to call close_stdout via atexit, instead.
Diffstat (limited to 'src/yes.c')
-rw-r--r-- | src/yes.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -54,7 +54,6 @@ Repeatedly output a line with all specified STRING(s), or `y'.\n\ --version output version information and exit\n")); puts (_("\nReport bugs to <bug-sh-utils@gnu.org>.")); } - close_stdout (); exit (status); } @@ -66,6 +65,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */ if (getenv ("POSIXLY_CORRECT") == NULL) parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, |