Commit 2d18e637e5ec628f165bc8866ed1ba73332c9386

Authored by blueswir1
1 parent 2adab7d6

Flush stdout after printing usage()

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
@@ -351,7 +351,7 @@ static void usage(void) @@ -351,7 +351,7 @@ static void usage(void)
351 interp_prefix, 351 interp_prefix,
352 x86_stack_size, 352 x86_stack_size,
353 DEBUG_LOGFILE); 353 DEBUG_LOGFILE);
354 - _exit(1); 354 + exit(1);
355 } 355 }
356 356
357 THREAD CPUState *thread_env; 357 THREAD CPUState *thread_env;
@@ -448,7 +448,7 @@ int main(int argc, char **argv) @@ -448,7 +448,7 @@ int main(int argc, char **argv)
448 #if defined(cpu_list) 448 #if defined(cpu_list)
449 cpu_list(stdout, &fprintf); 449 cpu_list(stdout, &fprintf);
450 #endif 450 #endif
451 - _exit(1); 451 + exit(1);
452 } 452 }
453 } else if (!strcmp(r, "drop-ld-preload")) { 453 } else if (!strcmp(r, "drop-ld-preload")) {
454 drop_ld_preload = 1; 454 drop_ld_preload = 1;
darwin-user/main.c
@@ -756,7 +756,7 @@ void usage(void) @@ -756,7 +756,7 @@ void usage(void)
756 interp_prefix, 756 interp_prefix,
757 stack_size, 757 stack_size,
758 DEBUG_LOGFILE); 758 DEBUG_LOGFILE);
759 - _exit(1); 759 + exit(1);
760 } 760 }
761 761
762 /* XXX: currently only used for async signals (see signal.c) */ 762 /* XXX: currently only used for async signals (see signal.c) */
@@ -840,7 +840,7 @@ int main(int argc, char **argv) @@ -840,7 +840,7 @@ int main(int argc, char **argv)
840 #if defined(cpu_list) 840 #if defined(cpu_list)
841 cpu_list(stdout, &fprintf); 841 cpu_list(stdout, &fprintf);
842 #endif 842 #endif
843 - _exit(1); 843 + exit(1);
844 } 844 }
845 } else 845 } else
846 { 846 {
linux-user/main.c
@@ -2213,7 +2213,7 @@ static void usage(void) @@ -2213,7 +2213,7 @@ static void usage(void)
2213 interp_prefix, 2213 interp_prefix,
2214 x86_stack_size, 2214 x86_stack_size,
2215 DEBUG_LOGFILE); 2215 DEBUG_LOGFILE);
2216 - _exit(1); 2216 + exit(1);
2217 } 2217 }
2218 2218
2219 THREAD CPUState *thread_env; 2219 THREAD CPUState *thread_env;
@@ -2335,7 +2335,7 @@ int main(int argc, char **argv, char **envp) @@ -2335,7 +2335,7 @@ int main(int argc, char **argv, char **envp)
2335 #if defined(cpu_list) 2335 #if defined(cpu_list)
2336 cpu_list(stdout, &fprintf); 2336 cpu_list(stdout, &fprintf);
2337 #endif 2337 #endif
2338 - _exit(1); 2338 + exit(1);
2339 } 2339 }
2340 } else if (!strcmp(r, "drop-ld-preload")) { 2340 } else if (!strcmp(r, "drop-ld-preload")) {
2341 (void) envlist_unsetenv(envlist, "LD_PRELOAD"); 2341 (void) envlist_unsetenv(envlist, "LD_PRELOAD");