diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-13 10:32:48 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-13 10:32:48 -0700 |
commit | c192ad9dcd9e70e206340caa0a4bbd70fd0582bf (patch) | |
tree | 3d80f66db0dad054a400ffdf53a095c02613ead8 | |
parent | 2ebdc234f035e14d15091081952d70fba472b967 (diff) | |
download | portage-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.
-rwxr-xr-x | bin/ebuild.sh | 9 |
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 |