]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include "closeout.h".
authorJim Meyering <jim@meyering.net>
Sun, 7 May 2000 14:52:16 +0000 (14:52 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 7 May 2000 14:52:16 +0000 (14:52 +0000)
(main): Call atexit with close_stdout.

src/expr.c

index 96b182326829995e7fa2dd1ea8eeb1e35a60e854..7dea02b75a28145ac675e49d2d2fd490873f6704 100644 (file)
@@ -1,5 +1,5 @@
 /* expr -- evaluate expressions.
-   Copyright (C) 86, 1991-1997, 1999 Free Software Foundation, Inc.
+   Copyright (C) 86, 1991-1997, 1999, 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
@@ -37,6 +37,7 @@
 #include "long-options.h"
 #include "error.h"
 #include "xalloc.h"
+#include "closeout.h"
 
 /* The official name of this program (e.g., no `g' prefix).  */
 #define PROGRAM_NAME "expr"
@@ -168,6 +169,8 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
+  atexit (close_stdout);
+
   posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
 
   /* Recognize --help or --version only if POSIXLY_CORRECT is not set.  */