qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] flush stdout after printing usage()


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] flush stdout after printing usage()
Date: Wed, 28 Jan 2009 14:10:42 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Riku Voipio wrote:
testcase:

qemu-arm|grep cpu

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

It should get flushed upon exit(). Perhaps the problem is that we're using _exit() instead of exit()?

Regards,

Anthony Liguori

Signed-off-by: Riku Voipio <address@hidden>
---
 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);
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]