From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVRm9-0003Hd-JG for qemu-devel@nongnu.org; Fri, 06 Feb 2009 09:33:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVRm7-0003FG-V1 for qemu-devel@nongnu.org; Fri, 06 Feb 2009 09:33:49 -0500 Received: from [199.232.76.173] (port=35311 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVRm7-0003Er-Hp for qemu-devel@nongnu.org; Fri, 06 Feb 2009 09:33:47 -0500 Received: from [84.20.150.76] (port=41024 helo=narury.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LVRm7-0002cg-4B for qemu-devel@nongnu.org; Fri, 06 Feb 2009 09:33:47 -0500 Received: from kos.to (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by narury.org (Postfix) with ESMTP id D2943327400F for ; Fri, 6 Feb 2009 16:33:39 +0200 (EET) Date: Fri, 6 Feb 2009 16:33:39 +0200 From: Riku Voipio Subject: Re: [Qemu-devel] [PATCH] flush stdout after printing usage() Message-ID: <20090206143339.GA10366@kos.to> References: <20090128184713.GA29581@kos.to> <4980BBC2.3050709@codemonkey.ws> <20090128210639.GB4155@kos.to> <1233179485.6716.7.camel@cocoduo.atr> <4980D569.9060408@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4980D569.9060408@codemonkey.ws> 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 On Wed, Jan 28, 2009 at 04:00:09PM -0600, Anthony Liguori wrote: > Lionel Landwerlin wrote: >>> On Wed, Jan 28, 2009 at 02:10:42PM -0600, Anthony Liguori wrote: >>>> Riku Voipio wrote: >>>>> 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()? >>>> >> _exit does not trigger callbacks registred with at_exit. > Yes. The question is why is it being used? What at_exit handler are we > trying to avoid. Historic reasons? Just to "be safe" since system qemu uses atexit handlers? I don't see any atexit handlers registered for linux-user (or bsd-user) targets for current svn qemu. Definetly none registered at command line parsing stage.