[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] Usage of econf with an additional || die
From:       Matthias Schwarzott <zzam () gentoo ! org>
Date:       2008-09-30 17:10:48
Message-ID: 200809301910.49138.zzam () gentoo ! org
[Download RAW message or body]

On Dienstag, 30. September 2008, Thomas Sachau wrote:
>
> From my knowledge and experience with sunrise:
>
> some functions that dont need "|| die":
> epatch, econf, eqmake3, eqmake4
>
> some functions that need "|| die":
> emake, do*
>
> Afaik die wont work in a subshell independent of how it is called, so the
> die from econf wont work, but also the "emake || die" one would also not
> work.

Well there might be some cases when die does not work fine, I am not sure.
But it IS designed to work in subshells.
Looking into /usr/lib/portage/bin/isolated-functions.sh: die basically calls
kill -s SIGTERM ${EBUILD_MASTER_PID}


and sigterm is catched in /usr/lib/portage/bin/ebuild.sh

# subshell die support
EBUILD_MASTER_PID=$$
trap 'exit 1' SIGTERM

and btw. econf is also implemented as a function in ebuild.sh so it even is 
executed inside the "main" ebuild bash process - no subshell here.

Regards
Matthias

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic