summaryrefslogtreecommitdiffstats
path: root/term-utils/mesg.c
diff options
context:
space:
mode:
Diffstat (limited to 'term-utils/mesg.c')
-rw-r--r--term-utils/mesg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/term-utils/mesg.c b/term-utils/mesg.c
index 4fad6f57a..366c679ac 100644
--- a/term-utils/mesg.c
+++ b/term-utils/mesg.c
@@ -54,6 +54,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <getopt.h>
+
+#include "closestream.h"
#include "nls.h"
#include "c.h"
@@ -88,6 +90,7 @@ int main(int argc, char *argv[])
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
static const struct option longopts[] = {
{ "verbose", no_argument, 0, 'v' },