From 757bbfad4f78112a8bb537dff51790eb9b5b9e57 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 4 Apr 2012 19:53:13 +0200 Subject: [PATCH] partx: verify writing to streams was successful Signed-off-by: Sami Kerola --- partx/partx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/partx/partx.c b/partx/partx.c index 0c46af6ebf..f19b919284 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -33,6 +33,7 @@ #include "sysfs.h" #include "loopdev.h" #include "at.h" +#include "closestream.h" /* this is the default upper limit, could be modified by --nr */ #define SLICES_MAX 256 @@ -667,6 +668,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); while ((c = getopt_long(argc, argv, "abdglrsvn:t:o:PhV", long_opts, NULL)) != -1) { -- 2.47.3