From: Sami Kerola Date: Wed, 11 Apr 2012 18:41:56 +0000 (+0200) Subject: eject: verify writing to streams was successful X-Git-Tag: v2.22-rc1~506 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9146de0266807ce4dce468a6a9cc20fbfb544b03;p=thirdparty%2Futil-linux.git eject: verify writing to streams was successful Signed-off-by: Sami Kerola --- diff --git a/sys-utils/eject.c b/sys-utils/eject.c index 5aec0baa7b..e008886cfa 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -46,6 +46,7 @@ #include #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);