(main): Call atexit with close_stdout.
/* Modified to run with the GNU shell by bfox. */
-/* Copyright (C) 1987-1999 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2000 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#if defined (TEST_STANDALONE)
# include "long-options.h"
+# include "closeout.h"
void
usage (int status)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+
+ atexit (close_stdout);
#endif /* TEST_STANDALONE */
argv = margv;
/* uname -- print system information
- Copyright (C) 1989-1999 Free Software Foundation, Inc.
+ Copyright (C) 1989-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
#include "system.h"
#include "error.h"
+#include "closeout.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "uname"
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
toprint = 0;
while ((c = getopt_long (argc, argv, "snrvpma", long_options, NULL)) != -1)
#include "long-options.h"
#include "readutmp.h"
#include "system.h"
+#include "closeout.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "uptime"
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS, usage);
#include "long-options.h"
#include "readutmp.h"
#include "system.h"
+#include "closeout.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "users"
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS, usage);
#include "error.h"
#include "readutmp.h"
#include "system.h"
+#include "closeout.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "who"
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
while ((optc = getopt_long (argc, argv, "ilmqsuwHT", longopts, &longind))
!= -1)
{
/* whoami -- print effective userid
- Copyright (C) 89,90, 1991-1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 89,90, 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
#include "system.h"
#include "long-options.h"
+#include "closeout.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "whoami"
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS, usage);