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