]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
eject: verify writing to streams was successful
authorSami Kerola <kerolasa@iki.fi>
Wed, 11 Apr 2012 18:41:56 +0000 (20:41 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Apr 2012 10:02:07 +0000 (12:02 +0200)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/eject.c

index 5aec0baa7bd4dc669a3895ee1e7dbb72e88b650e..e008886cfa476e694db66a648f25635b009d94bb 100644 (file)
@@ -46,6 +46,7 @@
 #include <libmount.h>
 
 #include "c.h"
+#include "closestream.h"
 #include "nls.h"
 #include "strutils.h"
 #include "xalloc.h"
@@ -921,6 +922,7 @@ int main(int argc, char **argv)
        setlocale(LC_ALL,"");
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
+       atexit(close_stdout);
 
        /* parse the command line arguments */
        parse_args(argc, argv, &device);