From 2823bfddfb00ea82fd1b97389df6f92196d9ddf7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 25 Dec 2006 19:13:37 +0000 Subject: Use a SIGTERM signal to support a die call inside of a subshell. svn path=/main/trunk/; revision=5391 --- bin/ebuild.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 709aefaee..d17a5ab03 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 } -- cgit v1.2.3-1-g7c22