From 071e5e3b2511ccd17474c8a42abd492b3e0e6999 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 7 May 2000 14:53:15 +0000 Subject: Include "closeout.h". (main): Call atexit with close_stdout. --- src/hostid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hostid.c') diff --git a/src/hostid.c b/src/hostid.c index 607ccaa38..b1cfb0e1a 100644 --- a/src/hostid.c +++ b/src/hostid.c @@ -1,5 +1,5 @@ /* print the hexadecimal identifier for the current host - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 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 @@ -70,6 +70,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); @@ -82,7 +84,5 @@ main (int argc, char **argv) id = gethostid (); printf ("%lx\n", id); - close_stdout (); - exit (EXIT_SUCCESS); } -- cgit v1.2.3-54-g00ecf