From b87cbe8486a2799a137c8100afaa05b352bb0ccf Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 4 Apr 2012 19:39:15 +0200 Subject: text-utils: verify writing to streams was successful Signed-off-by: Sami Kerola --- text-utils/pg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'text-utils/pg.c') diff --git a/text-utils/pg.c b/text-utils/pg.c index b61b1504f..2b5144252 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -63,6 +63,7 @@ #include "xalloc.h" #include "widechar.h" #include "writeall.h" +#include "closestream.h" #define READBUF LINE_MAX /* size of input buffer */ #define CMDBUF 255 /* size of command buffer */ @@ -1594,6 +1595,7 @@ main(int argc, char **argv) setlocale(LC_MESSAGES, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); if (tcgetattr(1, &otio) == 0) { ontty = 1; -- cgit v1.2.3-55-g7522