From efb8854f4cfa335f3ad72d79a84589110c2a8e87 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 4 Apr 2012 19:49:40 +0200 Subject: sys-utils: verify writing to streams was successful Signed-off-by: Sami Kerola --- sys-utils/setsid.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys-utils/setsid.c') diff --git a/sys-utils/setsid.c b/sys-utils/setsid.c index 132f4a2ab..6d1eeda42 100644 --- a/sys-utils/setsid.c +++ b/sys-utils/setsid.c @@ -19,6 +19,7 @@ #include "c.h" #include "nls.h" +#include "closestream.h" static void __attribute__ ((__noreturn__)) usage(FILE * out) { @@ -53,6 +54,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); while ((ch = getopt_long(argc, argv, "+Vhc", longopts, NULL)) != -1) switch (ch) { -- cgit v1.2.3-55-g7522