summaryrefslogtreecommitdiff
path: root/rmt
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-02-07 23:51:16 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-02-07 23:51:16 +0000
commit7a86488bf7607f5935c36a391f40743cbb32106a (patch)
tree7f973b3f9297a919ca74c7a519b034ac68310b60 /rmt
parent816a1cf92921e78938299ce6cc83424ce2aa4e28 (diff)
downloadpaxutils-7a86488bf7607f5935c36a391f40743cbb32106a.tar.gz
* gnulib.modules: Add closeout.
* rmt/rmt.c: Include closeout.h. (main, usage): Use close_stdout to report write errors properly.
Diffstat (limited to 'rmt')
-rw-r--r--rmt/rmt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rmt/rmt.c b/rmt/rmt.c
index 4b51751..04f4e8e 100644
--- a/rmt/rmt.c
+++ b/rmt/rmt.c
@@ -1,7 +1,7 @@
/* Remote connection server.
- Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004,
+ 2005, 2006 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 the
@@ -32,6 +32,7 @@
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
#include "system.h"
+#include <closeout.h>
#include <localedir.h>
#include <safe-read.h>
#include <full-write.h>
@@ -260,6 +261,7 @@ Manipulate a tape drive, accepting commands from a remote process.\n\
--help Output this help.\n"),
program_name);
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+ close_stdout ();
}
exit (status);
@@ -563,6 +565,7 @@ main (int argc, char **argv)
case 'v':
version_etc (stdout, "rmt", PACKAGE_NAME, PACKAGE_VERSION,
"John Gilmore", "Jay Fenlason", (char *) NULL);
+ close_stdout ();
return EXIT_SUCCESS;
case -1: