summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ebuild.sh7
1 files changed, 7 insertions, 0 deletions
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
}