From: Sami Kerola Date: Wed, 4 Apr 2012 17:53:13 +0000 (+0200) Subject: partx: verify writing to streams was successful X-Git-Tag: v2.22-rc1~539^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=757bbfad4f78112a8bb537dff51790eb9b5b9e57;p=thirdparty%2Futil-linux.git partx: verify writing to streams was successful Signed-off-by: Sami Kerola --- 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) {