summaryrefslogtreecommitdiff
path: root/src/whoami.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-07 14:46:33 +0000
committerJim Meyering <jim@meyering.net>2000-05-07 14:46:33 +0000
commit72bdac727100dd893ad1041cb9a06b48fa211058 (patch)
tree8eaf75b31d328c20dcc50e79e2b124c552a0ee62 /src/whoami.c
parentf1013a15356cd77518af435233564f0ba7b7c099 (diff)
downloadcoreutils-72bdac727100dd893ad1041cb9a06b48fa211058.tar.xz
Include "closeout.h".
(main): Call atexit with close_stdout.
Diffstat (limited to 'src/whoami.c')
-rw-r--r--src/whoami.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/whoami.c b/src/whoami.c
index e5fd7183f..1279b5975 100644
--- a/src/whoami.c
+++ b/src/whoami.c
@@ -1,5 +1,5 @@
/* 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
@@ -26,6 +26,7 @@
#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"
@@ -72,6 +73,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);