diff options
Diffstat (limited to 'src/mv.c')
-rw-r--r-- | src/mv.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* mv -- move or rename files - Copyright (C) 86, 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 86, 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,6 +49,7 @@ #include "system.h" #include "path-concat.h" #include "backupfile.h" +#include "closeout.h" #include "error.h" #ifdef HAVE_LCHOWN @@ -454,6 +455,7 @@ version control may be set with VERSION_CONTROL, values are:\n\ never, simple always make simple backups\n\ ")); puts (_("\nReport bugs to <fileutils-bugs@gnu.org>.")); + close_stdout (); } exit (status); } @@ -517,6 +519,7 @@ main (int argc, char **argv) if (show_version) { printf ("mv (%s) %s\n", GNU_PACKAGE, VERSION); + close_stdout (); exit (0); } @@ -545,5 +548,7 @@ main (int argc, char **argv) for (; optind < argc - 1; ++optind) errors |= movefile (argv[optind], argv[argc - 1], dest_is_dir); + if (verbose) + close_stdout (); exit (errors); } |