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/rev.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'text-utils/rev.c') diff --git a/text-utils/rev.c b/text-utils/rev.c index 8a1666800..3c64c12d1 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -62,6 +62,7 @@ #include "xalloc.h" #include "widechar.h" #include "c.h" +#include "closestream.h" wchar_t *buf; @@ -96,6 +97,7 @@ int main(int argc, char *argv[]) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); signal(SIGINT, sig_handler); signal(SIGTERM, sig_handler); -- cgit v1.2.3-55-g7522