From: Jim Meyering Date: Sun, 7 May 2000 14:48:25 +0000 (+0000) Subject: Include "closeout.h". X-Git-Tag: SH-UTILS-2_0h~20 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a3d40a9447e08adf7783f1e096463e64ed82f761;p=thirdparty%2Fcoreutils.git Include "closeout.h". (main): Call atexit with close_stdout. --- diff --git a/src/stty.c b/src/stty.c index 307e23542d..3bbf0a6f1f 100644 --- a/src/stty.c +++ b/src/stty.c @@ -64,6 +64,7 @@ #include "long-options.h" #include "error.h" #include "xstrtol.h" +#include "closeout.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "stty" @@ -717,6 +718,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); diff --git a/src/su.c b/src/su.c index 35a6b21fbe..5b78ed214a 100644 --- a/src/su.c +++ b/src/su.c @@ -82,6 +82,7 @@ #define getusershell _getusershell_sys_proto_ #include "system.h" +#include "closeout.h" #undef getusershell @@ -449,6 +450,7 @@ Change the effective user id and group id to that of USER.\n\ A mere - implies -l. If USER not given, assume root.\n\ ")); puts (_("\nReport bugs to .")); + close_stdout (); } exit (status); }