Setup EBUILD_MASTER_PID at the bottom, for scripts that source
authorZac Medico <zmedico@gentoo.org>
Fri, 13 Aug 2010 19:49:16 +0000 (12:49 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 13 Aug 2010 19:49:16 +0000 (12:49 -0700)
ebuild.sh.

bin/ebuild.sh

index 73a610b7ef6d3e615f43f64234d22ca747e01f15..9af7e38671c6e54c2af6a1cb09fe6638739e20cf 100755 (executable)
@@ -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