From: "Loïc Minier" <lool@dooz.org>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler
Date: Sat, 25 Sep 2010 14:01:24 +0200 [thread overview]
Message-ID: <20100925120124.GA19083@bee.dooz.org> (raw)
In-Reply-To: <AANLkTi=8WxquxCX0bzydjfUcgLwi__oka5P9rQWaJBBh@mail.gmail.com>
On Sat, Sep 25, 2010, Blue Swirl wrote:
> It looks like dash and ksh are not compliant and use the return value
> of echo or rm inside trap handler:
> dash -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $?
> 4
I've filed https://bugs.launchpad.net/dash/+bug/647450 to track this
and forwarded the bug to dash@vger.kernel.org.
> ksh -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $?
> 4
On my system, ksh is provided by zsh and zsh gets this right.
In the mean time, could you please pull the patch in QEMU? Without
"exit" in the trap handler, the correct exit code will be returned.
Thanks,
--
Loïc Minier
next prev parent reply other threads:[~2010-09-25 12:01 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 [this message]
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
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=20100925120124.GA19083@bee.dooz.org \
--to=lool@dooz.org \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--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).