mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
Arrange to call close_stdout only upon exit.
This commit is contained in:
5
src/rm.c
5
src/rm.c
@@ -104,7 +104,6 @@ use one of these commands:\n\
|
||||
"),
|
||||
program_name, program_name);
|
||||
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -132,6 +131,8 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
atexit (close_stdout);
|
||||
|
||||
rm_option_init (&x);
|
||||
|
||||
while ((c = getopt_long (argc, argv, "dfirvR", long_opts, NULL)) != -1)
|
||||
@@ -195,7 +196,5 @@ main (int argc, char **argv)
|
||||
|
||||
remove_fini ();
|
||||
|
||||
if (x.verbose)
|
||||
close_stdout ();
|
||||
exit (fail);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user