From: Michal Marek <mmarek@suse.cz>
To: Sylvain BERTRAND <sylvain.bertrand@gmail.com>,
linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: Re: [PATCH] scripts: fix link-vmlinux.sh bash-ism
Date: Fri, 02 Jan 2015 16:55:42 +0100 [thread overview]
Message-ID: <54A6BF7E.8070003@suse.cz> (raw)
In-Reply-To: <20141229163456.GB27533@dhcppc1>
On 2014-12-29 17:34, Sylvain BERTRAND wrote:
> Chocked while compiling linux with dash shell instead of bash shell.
> See:
> http://pubs.opengroup.org/onlinepubs/000095399/utilities/trap.html
Please describe the actual problem in the changelog. I guess it's
because of the 'ERR' trap?
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Sylvain BERTRAND <sylvain.bertrand@gmail.com>
> ---
> --- a/scripts/link-vmlinux.sh 2014-12-29 15:10:29.436431249 +0000
> +++ b/scripts/link-vmlinux.sh 2014-12-29 16:23:06.010853608 +0000
> @@ -111,7 +111,6 @@
> }
>
> # Delete output files in case of error
> -trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM ERR
> cleanup()
> {
> rm -f .old_version
> @@ -124,6 +123,20 @@
> rm -f vmlinux.o
> }
>
> +on_exit()
> +{
> + if [ $? -ne 0 ]; then
> + cleanup
> + fi
> +}
> +trap on_exit EXIT
> +
> +on_signals()
> +{
> + exit 1
> +}
> +trap on_signals HUP INT QUIT TERM
Why not use 'cleanup' directly as a handler?
Michal
next prev parent reply other threads:[~2015-01-02 15:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 16:34 [PATCH] scripts: fix link-vmlinux.sh bash-ism Sylvain BERTRAND
2015-01-02 15:55 ` Michal Marek [this message]
2015-03-03 16:34 ` Sylvain BERTRAND
2015-03-17 20:59 ` Michal Marek
2015-04-27 15:25 ` sylvain.bertrand
2015-05-06 13:54 ` sylvain.bertrand
2015-05-06 14:25 ` Michal Marek
2015-05-07 0:36 ` [PATCH v2] " sylvain.bertrand
2015-05-07 11:58 ` Michal Marek
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=54A6BF7E.8070003@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sylvain.bertrand@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.