summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-25 19:13:37 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-25 19:13:37 +0000
commit2823bfddfb00ea82fd1b97389df6f92196d9ddf7 (patch)
tree11f6a5ccf55ab405d10a08a7d0791c0a0c9b5ef9 /bin/ebuild.sh
parentMake sure that portage_group_warning() will be shown even in quiet mode. (diff)
downloadportage-multirepo-2823bfddfb00ea82fd1b97389df6f92196d9ddf7.tar.gz
portage-multirepo-2823bfddfb00ea82fd1b97389df6f92196d9ddf7.tar.bz2
portage-multirepo-2823bfddfb00ea82fd1b97389df6f92196d9ddf7.zip
Use a SIGTERM signal to support a die call inside of a subshell.
svn path=/main/trunk/; revision=5391
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 709aefae..d17a5ab0 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -24,6 +24,10 @@ if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ]; then
fi
fi
+# subshell die support
+EBUILD_MASTER_PID=$$
+trap 'exit 1' SIGTERM
+
EBUILD_SH_ARGS="$*"
shift $#
@@ -263,6 +267,9 @@ diefunc() {
${x} "$@" >&2 1>&2
done
fi
+
+ # subshell die support
+ kill -s SIGTERM ${EBUILD_MASTER_PID}
exit 1
}