qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] flush stdout after printing usage()
Date: Wed, 28 Jan 2009 20:47:13 +0200	[thread overview]
Message-ID: <20090128184713.GA29581@kos.to> (raw)

testcase:

qemu-arm|grep cpu

Without fflush() getting output from piped qemu is a bit random.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 bsd-user/main.c    |    1 +
 darwin-user/main.c |    1 +
 linux-user/main.c  |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 636f1dc..f3cb3b1 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -351,6 +351,7 @@ static void usage(void)
            interp_prefix,
            x86_stack_size,
            DEBUG_LOGFILE);
+    fflush(stdout);
     _exit(1);
 }
 
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 3edad73..44e8f7c 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -758,6 +758,7 @@ void usage(void)
            interp_prefix,
            stack_size,
            DEBUG_LOGFILE);
+    fflush(stdout);
     _exit(1);
 }
 
diff --git a/linux-user/main.c b/linux-user/main.c
index 3418ca6..9b807e5 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2216,6 +2216,7 @@ static void usage(void)
            interp_prefix,
            x86_stack_size,
            DEBUG_LOGFILE);
+    fflush(stdout);
     _exit(1);
 }
 
-- 
1.5.6.5


-- 
"rm -rf" only sounds scary if you don't have backups

             reply	other threads:[~2009-01-28 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 18:47 Riku Voipio [this message]
2009-01-28 20:10 ` [Qemu-devel] [PATCH] flush stdout after printing usage() Anthony Liguori
2009-01-28 21:06   ` Riku Voipio
2009-01-28 21:51     ` Lionel Landwerlin
2009-01-28 22:00       ` Anthony Liguori
2009-02-06 14:33         ` Riku Voipio

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=20090128184713.GA29581@kos.to \
    --to=riku.voipio@iki.fi \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).