summaryrefslogtreecommitdiff
path: root/src/sum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sum.c b/src/sum.c
index cadcee007..b012182c8 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -1,5 +1,5 @@
/* sum -- checksum and count the blocks in a file
- Copyright (C) 86, 89, 91, 1995-1999 Free Software Foundation, Inc.
+ Copyright (C) 86, 89, 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
@@ -25,6 +25,7 @@
#include <sys/types.h>
#include <getopt.h>
#include "system.h"
+#include "closeout.h"
#include "error.h"
#include "safe-read.h"
@@ -213,6 +214,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
have_read_stdin = 0;
while ((optc = getopt_long (argc, argv, "rs", longopts, NULL)) != -1)