]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/unshare.c
sys-utils: verify writing to streams was successful
[thirdparty/util-linux.git] / sys-utils / unshare.c
index 728b860375aa7d30f1b10454aab24cbcefa10313..9de997bdc8ccd6badfa69edef9e537bdb7cb2532 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "nls.h"
 #include "c.h"
+#include "closestream.h"
 
 #ifndef CLONE_NEWSNS
 # define CLONE_NEWNS 0x00020000
@@ -91,6 +92,7 @@ int main(int argc, char *argv[])
        setlocale(LC_MESSAGES, "");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
+       atexit(close_stdout);
 
        while((c = getopt_long(argc, argv, "hVmuin", longopts, NULL)) != -1) {
                switch(c) {