summaryrefslogtreecommitdiff
path: root/src/split.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-20 22:06:38 +0000
committerJim Meyering <jim@meyering.net>2000-05-20 22:06:38 +0000
commit24f2bd8c9f62409ef7d7c919c9a53f438ee991cb (patch)
tree0d30aa82a2c6c12ab2224c5ecffb9ded6a11caaa /src/split.c
parentac8180336348bee878584b013d71f84e5d047f21 (diff)
downloadcoreutils-24f2bd8c9f62409ef7d7c919c9a53f438ee991cb.tar.xz
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
Diffstat (limited to 'src/split.c')
-rw-r--r--src/split.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/split.c b/src/split.c
index 46ba9b3ca..c4823cc1c 100644
--- a/src/split.c
+++ b/src/split.c
@@ -1,5 +1,5 @@
/* split.c -- split a file into pieces.
- Copyright (C) 88, 91, 1995-1999 Free Software Foundation, Inc.
+ Copyright (C) 88, 91, 1995-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
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include "system.h"
+#include "closeout.h"
#include "error.h"
#include "safe-read.h"
#include "xstrtol.h"
@@ -348,6 +349,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
/* Parse command line options. */
infile = "-";