From: Blue Swirl <blauwirbel@gmail.com>
To: "Loïc Minier" <loic.minier@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Avoid exit in trap as it breaks with some shells
Date: Sun, 26 Sep 2010 06:58:45 +0000 [thread overview]
Message-ID: <AANLkTimD1wLgrDNkcCA-AThcGPJ+aybpdw1ofpkpOuAW@mail.gmail.com> (raw)
In-Reply-To: <1285444350-16679-1-git-send-email-loic.minier@linaro.org>
Thanks, applied. Please remember to add the Signed-off-line.
On Sat, Sep 25, 2010 at 7:52 PM, Loïc Minier <loic.minier@linaro.org> 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.
> ---
> configure | 4 +++-
> 1 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="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"
> TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"
> TMPE="${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 shells;
> +# see <1285349658-3122-1-git-send-email-loic.minier@linaro.org>
> +trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
>
> compile_object() {
> $cc $QEMU_CFLAGS -c -o $TMPO $TMPC > /dev/null 2> /dev/null
> --
> 1.7.1
>
>
>
next prev parent reply other threads:[~2010-09-26 6:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-24 17:34 [Qemu-devel] [PATCH] Don't exit with zero in the trap handler Loïc Minier
2010-09-25 6:43 ` Markus Armbruster
2010-09-25 8:31 ` Loïc Minier
2010-09-25 9:01 ` Blue Swirl
2010-09-25 12:01 ` Loïc Minier
2010-09-25 14:19 ` Markus Armbruster
2010-09-25 15:30 ` Blue Swirl
2010-09-25 19:52 ` [Qemu-devel] [PATCH] Avoid exit in trap as it breaks with some shells Loïc Minier
2010-09-26 6:58 ` Blue Swirl [this message]
2014-05-19 16:30 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimD1wLgrDNkcCA-AThcGPJ+aybpdw1ofpkpOuAW@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=loic.minier@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).