summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-14 15:37:04 +0000
committerJim Meyering <jim@meyering.net>1999-01-14 15:37:04 +0000
commitda258119328fe4af0e0aa0d6f292600732aa0bb4 (patch)
tree3d4ab4a3c9d52bc28eb15293a5c0a096d7e7ec6f /src/tee.c
parentdc4fd4c43b21e3c7043d963f1ecbae5716f06e61 (diff)
downloadcoreutils-da258119328fe4af0e0aa0d6f292600732aa0bb4.tar.xz
Include closeout.h. (main): Use close_stdout.
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tee.c b/src/tee.c
index 302c4b734..eac1eab3b 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -1,5 +1,5 @@
/* tee - read from standard input and write to standard output and files.
- Copyright (C) 85,90,91,92,93,94,95,96,1997 Free Software Foundation, Inc.
+ Copyright (C) 85,1990-1999 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
@@ -24,6 +24,7 @@
#include <getopt.h>
#include "system.h"
+#include "closeout.h"
#include "error.h"
int full_write ();
@@ -151,8 +152,9 @@ main (int argc, char **argv)
errs = tee (argc - optind, (const char **) &argv[optind]);
if (close (0) != 0)
error (1, errno, _("standard input"));
- if (close (1) != 0)
- error (1, errno, _("standard output"));
+
+ close_stdout ();
+
exit (errs);
}