From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45064 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzlCW-0001DS-Uj for qemu-devel@nongnu.org; Sun, 26 Sep 2010 02:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzlCV-0005Iw-H1 for qemu-devel@nongnu.org; Sun, 26 Sep 2010 02:59:08 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:40921) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzlCV-0005Iq-Cl for qemu-devel@nongnu.org; Sun, 26 Sep 2010 02:59:07 -0400 Received: by qyk5 with SMTP id 5so6462208qyk.4 for ; Sat, 25 Sep 2010 23:59:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1285444350-16679-1-git-send-email-loic.minier@linaro.org> References: <1285444350-16679-1-git-send-email-loic.minier@linaro.org> From: Blue Swirl Date: Sun, 26 Sep 2010 06:58:45 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH] Avoid exit in trap as it breaks with some shells 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?B?TG/Dr2MgTWluaWVy?= Cc: qemu-devel@nongnu.org Thanks, applied. Please remember to add the Signed-off-line. On Sat, Sep 25, 2010 at 7:52 PM, Lo=C3=AFc Minier = wrote: > Don't call exit in the trap handler as it causes the return code to be > zero with some buggy shells (dash and pdksh at least) and is useless > here anyway. > --- > =C2=A0configure | =C2=A0 =C2=A04 +++- > =C2=A01 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index 3bfc5e9..9d3acfc 100755 > --- a/configure > +++ b/configure > @@ -15,7 +15,9 @@ TMPC=3D"${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c" > =C2=A0TMPO=3D"${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o" > =C2=A0TMPE=3D"${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.exe" > > -trap "rm -f $TMPC $TMPO $TMPE ; exit" EXIT INT QUIT TERM > +# NB: do not call "exit" in the trap handler; this is buggy with some sh= ells; > +# see <1285349658-3122-1-git-send-email-loic.minier@linaro.org> > +trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM > > =C2=A0compile_object() { > =C2=A0 $cc $QEMU_CFLAGS -c -o $TMPO $TMPC > /dev/null 2> /dev/null > -- > 1.7.1 > > >