mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +02:00
Include "closeout.h".
(main): Call atexit with close_stdout.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -339,6 +339,8 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
atexit (close_stdout);
|
||||
|
||||
equal_width = 0;
|
||||
separator = "\n";
|
||||
first = 1.0;
|
||||
@@ -455,7 +457,5 @@ format string may not be specified when printing equal width strings"));
|
||||
|
||||
errs = print_numbers (format_str);
|
||||
|
||||
close_stdout ();
|
||||
|
||||
exit (errs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user