From 81b16373ae2acf0e585e30b91b0a0dd1ac7883fb Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 13 May 2000 06:49:53 +0000 Subject: Arrange to call close_stdout only upon exit. --- src/mv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mv.c') diff --git a/src/mv.c b/src/mv.c index b9f057042..796a9ebce 100644 --- a/src/mv.c +++ b/src/mv.c @@ -379,7 +379,6 @@ the VERSION_CONTROL environment variable. Here are the values:\n\ simple, never always make simple backups\n\ ")); puts (_("\nReport bugs to .")); - close_stdout (); } exit (status); } @@ -404,6 +403,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + cp_option_init (&x); /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless @@ -522,7 +523,5 @@ main (int argc, char **argv) errors |= movefile (file[i], target_directory, dest_is_dir, &x); } - if (x.verbose) - close_stdout (); exit (errors); } -- cgit v1.2.3-70-g09d2