summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-04 22:45:28 +0000
committerJim Meyering <jim@meyering.net>1998-01-04 22:45:28 +0000
commit5d4f8ebdfda9a4aadaeb30aebd34542e55bc13e1 (patch)
treeebcd4ea3aeb95093c8658d1442ee10612a29f438 /src/install.c
parentb246280c27644ec0f08909d33e652cabb6b16981 (diff)
downloadcoreutils-5d4f8ebdfda9a4aadaeb30aebd34542e55bc13e1.tar.xz
(main, usage): Check for write error to stdout before exiting.
Include "closeout.h".
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/install.c b/src/install.c
index 470da79a7..7cbd2f6db 100644
--- a/src/install.c
+++ b/src/install.c
@@ -1,5 +1,5 @@
/* install - copy files and set attributes
- Copyright (C) 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 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
@@ -70,6 +70,7 @@
#include "backupfile.h"
#include "modechange.h"
#include "makepath.h"
+#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
@@ -257,6 +258,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("install (%s) %s\n", GNU_PACKAGE, VERSION);
+ close_stdout ();
exit (0);
}
@@ -318,6 +320,8 @@ main (int argc, char **argv)
}
}
+ if (verbose)
+ close_stdout ();
exit (errors);
}
@@ -672,6 +676,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);
}