public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH] eject: verify writing to streams was successful
Date: Wed, 11 Apr 2012 20:41:56 +0200	[thread overview]
Message-ID: <1334169716-2552-1-git-send-email-kerolasa@iki.fi> (raw)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 sys-utils/eject.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index 5aec0ba..e008886 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -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);
-- 
1.7.10


             reply	other threads:[~2012-04-11 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 18:41 Sami Kerola [this message]
2012-04-23 10:03 ` [PATCH] eject: verify writing to streams was successful Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334169716-2552-1-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox