summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-13 10:32:48 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-13 10:32:48 -0700
commitc192ad9dcd9e70e206340caa0a4bbd70fd0582bf (patch)
tree3d80f66db0dad054a400ffdf53a095c02613ead8 /bin/ebuild.sh
parent2ebdc234f035e14d15091081952d70fba472b967 (diff)
downloadportage-c192ad9dcd9e70e206340caa0a4bbd70fd0582bf.tar.gz
portage-c192ad9dcd9e70e206340caa0a4bbd70fd0582bf.tar.bz2
portage-c192ad9dcd9e70e206340caa0a4bbd70fd0582bf.zip
Move EBUILD_MASTER_PID and associated SIGTERM trap into ebuild_main()
since it seems more reliable this way. This helps us avoid having EbuildIpcDaemon need to send a kill signal (and triggering the zombie message too). This is especially important for the die helper which is called by other helpers for EAPI 4.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 8b458705d..1b1c054f1 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -54,10 +54,6 @@ qa_call() {
return $retval
}
-# Subshell/helper die support (must export for the die helper).
-export EBUILD_MASTER_PID=$$
-trap 'exit 1' SIGTERM
-
EBUILD_SH_ARGS="$*"
shift $#
@@ -2034,6 +2030,11 @@ if [ "${EBUILD_PHASE}" != "depend" ] ; then
fi
ebuild_main() {
+
+ # Subshell/helper die support (must export for the die helper).
+ export EBUILD_MASTER_PID=$BASHPID
+ trap 'exit 1' SIGTERM
+
local f x
if [[ $EBUILD_PHASE != depend ]] ; then