diff options
Diffstat (limited to 'src/cp.c')
-rw-r--r-- | src/cp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* cp.c -- file copying (main routines) - Copyright (C) 89, 90, 91, 95, 1996, 1997 Free Software Foundation. + Copyright (C) 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation. 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 @@ -33,6 +33,7 @@ #include "backupfile.h" #include "argmatch.h" #include "path-concat.h" +#include "closeout.h" #include "cp-hash.h" #include "copy.h" #include "error.h" @@ -176,6 +177,7 @@ options are given and SOURCE and DEST are the same name for an existing,\n\ regular file.\n\ ")); puts (_("\nReport bugs to <fileutils-bugs@gnu.org>.")); + close_stdout (); } exit (status); } @@ -728,6 +730,7 @@ main (int argc, char **argv) if (show_version) { printf ("cp (%s) %s\n", GNU_PACKAGE, VERSION); + close_stdout (); exit (0); } @@ -760,5 +763,7 @@ main (int argc, char **argv) exit_status |= do_copy (argc, argv, &x); + if (x.verbose) + close_stdout (); exit (exit_status); } |