Flush stdout after printing usage()
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Feb 2009 20:14:00 +0000 (20:14 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Feb 2009 20:14:00 +0000 (20:14 +0000)
Fixes qemu-arm|grep cpu - with _exit() getting output from qemu --help
is a bit random. Since no atexit() handlers are registered for user mode
emulation, just use exit() instead.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6657 c046a42c-6fe2-441c-8c8c-71466251a162

bsd-user/main.c
darwin-user/main.c
linux-user/main.c

index 7d0d4b3..74a1ba6 100644 (file)
@@ -351,7 +351,7 @@ static void usage(void)
            interp_prefix,
            x86_stack_size,
            DEBUG_LOGFILE);
-    _exit(1);
+    exit(1);
 }
 
 THREAD CPUState *thread_env;
@@ -448,7 +448,7 @@ int main(int argc, char **argv)
 #if defined(cpu_list)
                     cpu_list(stdout, &fprintf);
 #endif
-                _exit(1);
+                exit(1);
             }
         } else if (!strcmp(r, "drop-ld-preload")) {
             drop_ld_preload = 1;
index 24e738b..9b8a3dc 100644 (file)
@@ -756,7 +756,7 @@ void usage(void)
            interp_prefix,
            stack_size,
            DEBUG_LOGFILE);
-    _exit(1);
+    exit(1);
 }
 
 /* XXX: currently only used for async signals (see signal.c) */
@@ -840,7 +840,7 @@ int main(int argc, char **argv)
 #if defined(cpu_list)
                     cpu_list(stdout, &fprintf);
 #endif
-                _exit(1);
+                exit(1);
             }
         } else
         {
index 00259dc..6e2984c 100644 (file)
@@ -2213,7 +2213,7 @@ static void usage(void)
            interp_prefix,
            x86_stack_size,
            DEBUG_LOGFILE);
-    _exit(1);
+    exit(1);
 }
 
 THREAD CPUState *thread_env;
@@ -2335,7 +2335,7 @@ int main(int argc, char **argv, char **envp)
 #if defined(cpu_list)
                     cpu_list(stdout, &fprintf);
 #endif
-                _exit(1);
+                exit(1);
             }
         } else if (!strcmp(r, "drop-ld-preload")) {
             (void) envlist_unsetenv(envlist, "LD_PRELOAD");