Received: from [140.186.70.92] (port=46786 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzOVC-0006ty-2c for qemu-devel@nongnu.org; Sat, 25 Sep 2010 02:44:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzOVA-0003xZ-UY for qemu-devel@nongnu.org; Sat, 25 Sep 2010 02:44:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33558) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzOVA-0003x1-Nt for qemu-devel@nongnu.org; Sat, 25 Sep 2010 02:44:52 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler References: <1285349658-3122-1-git-send-email-loic.minier@linaro.org> Date: Sat, 25 Sep 2010 08:43:54 +0200 In-Reply-To: <1285349658-3122-1-git-send-email-loic.minier@linaro.org> (=?utf-8?Q?=22Lo=C3=AFc?= Minier"'s message of "Fri, 24 Sep 2010 19:34:18 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Lo=C3=AFc?= Minier Cc: qemu-devel@nongnu.org Lo=C3=AFc Minier writes: > When configure runs "exit 1", the trap handler is run to cleanup any > files created by configure, but this trap handler itself calls "exit" > with no argument (which means zero exit code): > [...] > + echo Error: zlib check failed > Error: zlib check failed > + echo Make sure to have the zlib libs and headers installed. > Make sure to have the zlib libs and headers installed. > + echo > > + exit 1 > + rm -f /tmp/qemu-conf--2779-.c /tmp/qemu-conf--2779-.o > /tmp/qemu-conf--2779-.exe > + exit > > To fix this, remove the call to exit from the trap handler, leaving it > to the shell shell to exitafter the trap handler is run (honoring any > previously provided exit code). This suggests the old code screws up the exit code. It doesn't for me. Unless it does at least on some platforms, it's a cleanup, not a fix, and the commit message should reflect that.