From c192ad9dcd9e70e206340caa0a4bbd70fd0582bf Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 13 Aug 2010 10:32:48 -0700 Subject: [PATCH] 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. --- bin/ebuild.sh | 9 +++++---- 1 file 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 -- 2.26.2