From d3683509b3953beb014e540f6d6194658ede1dea Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 7 May 2000 14:51:07 +0000 Subject: Include "closeout.h". (main): Call atexit with close_stdout. --- src/echo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/echo.c') diff --git a/src/echo.c b/src/echo.c index bbb37f4f1..deb22bda1 100644 --- a/src/echo.c +++ b/src/echo.c @@ -1,5 +1,5 @@ /* echo.c, derived from code echo.c in Bash. - Copyright (C) 87,89, 1991-1997, 1999 Free Software Foundation, Inc. + Copyright (C) 87,89, 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 @@ -19,6 +19,7 @@ #include #include #include "system.h" +#include "closeout.h" #include "long-options.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -117,6 +118,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */ if (getenv ("POSIXLY_CORRECT") == NULL) parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, -- cgit v1.2.3-54-g00ecf