diff options
author | Sami Kerola | 2012-04-04 19:44:04 +0200 |
---|---|---|
committer | Sami Kerola | 2012-04-04 19:46:25 +0200 |
commit | cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9 (patch) | |
tree | 6e4b7254c8179edc8b8f3f1c0908f7e966732b49 /term-utils/mesg.c | |
parent | text-utils: verify writing to streams was successful (diff) | |
download | kernel-qcow2-util-linux-cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9.tar.gz kernel-qcow2-util-linux-cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9.tar.xz kernel-qcow2-util-linux-cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9.zip |
term-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/mesg.c')
-rw-r--r-- | term-utils/mesg.c | 3 |
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' }, |