summaryrefslogtreecommitdiff
path: root/src/hostname.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-05 21:55:32 +0000
committerJim Meyering <jim@meyering.net>2000-05-05 21:55:32 +0000
commit3140984fab615a5d694cc0fdbb1fe02b243b42ad (patch)
tree0350318af5cbb64911c9abdaa0d433df1c3fecc4 /src/hostname.c
parent19c397acdc7bf7cdb6a6cc7e27f54bf76ca71bed (diff)
downloadcoreutils-3140984fab615a5d694cc0fdbb1fe02b243b42ad.tar.xz
Include "closeout.h".
(main): Call close_stdout.
Diffstat (limited to 'src/hostname.c')
-rw-r--r--src/hostname.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hostname.c b/src/hostname.c
index beebb2dc8..6b2c4ddab 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -1,5 +1,5 @@
/* hostname - set or print the name of current host system
- Copyright (C) 1994-1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994-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
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include "system.h"
+#include "closeout.h"
#include "long-options.h"
#include "error.h"
@@ -113,6 +114,7 @@ main (int argc, char **argv)
if (hostname == NULL)
error (1, errno, _("cannot determine hostname"));
printf ("%s\n", hostname);
+ close_stdout ();
}
else
{