From 3862f68538b0f62ff448fa9c20b8fcfb948deeb1 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 4 Apr 2012 20:01:07 +0200 Subject: [PATCH] getopt: verify writing to streams was successful Signed-off-by: Sami Kerola --- getopt/getopt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/getopt/getopt.c b/getopt/getopt.c index 51ff19e95b..4e5043aaa6 100644 --- a/getopt/getopt.c +++ b/getopt/getopt.c @@ -58,6 +58,7 @@ #include #include +#include "closestream.h" #include "nls.h" #include "xalloc.h" @@ -363,6 +364,7 @@ int main(int argc, char *argv[]) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); init_longopt(); getopt_long_fp = getopt_long; -- 2.47.3