summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-07 14:46:11 +0000
committerJim Meyering <jim@meyering.net>2000-05-07 14:46:11 +0000
commitf1013a15356cd77518af435233564f0ba7b7c099 (patch)
tree04fb3e7334fd19f4c1ea65039bb4f49be8b2c4d4 /src/tee.c
parente1133c7a286f40a04a12da1be68728f388cc53b5 (diff)
downloadcoreutils-f1013a15356cd77518af435233564f0ba7b7c099.tar.xz
Include "closeout.h".
(main): Call atexit with close_stdout. Remove explicit close_stdout.
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tee.c b/src/tee.c
index 4eb3585b0..2d86fcb80 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,1990-1999 Free Software Foundation, Inc.
+ Copyright (C) 85,1990-2000 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
@@ -87,6 +87,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
append = 0;
ignore_interrupts = 0;
@@ -150,8 +152,6 @@ main (int argc, char **argv)
if (close (0) != 0)
error (1, errno, _("standard input"));
- close_stdout ();
-
exit (errs);
}