summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-13 12:49:16 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-13 12:49:16 -0700
commit6ec700e140ac8679907032af18df831677c421c9 (patch)
treedcca2333b00284d245720612b67a4f4b5c22ee42 /bin/ebuild.sh
parentdd865104978471af4ad8d09490c6c42873dba926 (diff)
downloadportage-6ec700e140ac8679907032af18df831677c421c9.tar.gz
portage-6ec700e140ac8679907032af18df831677c421c9.tar.bz2
portage-6ec700e140ac8679907032af18df831677c421c9.zip
Setup EBUILD_MASTER_PID at the bottom, for scripts that source
ebuild.sh.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 73a610b7e..9af7e3867 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -2240,5 +2240,9 @@ elif [[ -n $EBUILD_SH_ARGS ]] ; then
exit $?
fi
+# Subshell/helper die support (must export for the die helper).
+export EBUILD_MASTER_PID=$BASHPID
+trap 'exit 1' SIGTERM
+
# Do not exit when ebuild.sh is sourced by other scripts.
true