From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdVjt-00026L-3V for qemu-devel@nongnu.org; Sat, 28 Feb 2009 15:24:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdVjs-00025l-HR for qemu-devel@nongnu.org; Sat, 28 Feb 2009 15:24:48 -0500 Received: from [199.232.76.173] (port=42546 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdVjs-00025R-Ad for qemu-devel@nongnu.org; Sat, 28 Feb 2009 15:24:48 -0500 Received: from savannah.gnu.org ([199.232.41.3]:54146 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LdVjr-0003uK-WE for qemu-devel@nongnu.org; Sat, 28 Feb 2009 15:24:48 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LdVjq-0003tR-QI for qemu-devel@nongnu.org; Sat, 28 Feb 2009 20:24:46 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LdVZQ-0002cG-Ue for qemu-devel@nongnu.org; Sat, 28 Feb 2009 20:14:01 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 28 Feb 2009 20:14:01 +0000 Subject: [Qemu-devel] [6657] Flush stdout after printing usage() Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6657 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6657 Author: blueswir1 Date: 2009-02-28 20:14:00 +0000 (Sat, 28 Feb 2009) Log Message: ----------- 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 Modified Paths: -------------- trunk/bsd-user/main.c trunk/darwin-user/main.c trunk/linux-user/main.c Modified: trunk/bsd-user/main.c =================================================================== --- trunk/bsd-user/main.c 2009-02-28 18:39:42 UTC (rev 6656) +++ trunk/bsd-user/main.c 2009-02-28 20:14:00 UTC (rev 6657) @@ -351,7 +351,7 @@ interp_prefix, x86_stack_size, DEBUG_LOGFILE); - _exit(1); + exit(1); } THREAD CPUState *thread_env; @@ -448,7 +448,7 @@ #if defined(cpu_list) cpu_list(stdout, &fprintf); #endif - _exit(1); + exit(1); } } else if (!strcmp(r, "drop-ld-preload")) { drop_ld_preload = 1; Modified: trunk/darwin-user/main.c =================================================================== --- trunk/darwin-user/main.c 2009-02-28 18:39:42 UTC (rev 6656) +++ trunk/darwin-user/main.c 2009-02-28 20:14:00 UTC (rev 6657) @@ -756,7 +756,7 @@ interp_prefix, stack_size, DEBUG_LOGFILE); - _exit(1); + exit(1); } /* XXX: currently only used for async signals (see signal.c) */ @@ -840,7 +840,7 @@ #if defined(cpu_list) cpu_list(stdout, &fprintf); #endif - _exit(1); + exit(1); } } else { Modified: trunk/linux-user/main.c =================================================================== --- trunk/linux-user/main.c 2009-02-28 18:39:42 UTC (rev 6656) +++ trunk/linux-user/main.c 2009-02-28 20:14:00 UTC (rev 6657) @@ -2213,7 +2213,7 @@ interp_prefix, x86_stack_size, DEBUG_LOGFILE); - _exit(1); + exit(1); } THREAD CPUState *thread_env; @@ -2335,7 +2335,7 @@ #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");