projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b485fb4
)
Use a SIGTERM signal to support a die call inside of a subshell.
author
Zac Medico
<zmedico@gentoo.org>
Mon, 25 Dec 2006 19:13:37 +0000
(19:13 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 25 Dec 2006 19:13:37 +0000
(19:13 -0000)
svn path=/main/trunk/; revision=5391
bin/ebuild.sh
patch
|
blob
|
history
diff --git
a/bin/ebuild.sh
b/bin/ebuild.sh
index 709aefaeeb07caac5b5aae295e4c74d8a08210b2..d17a5ab037c29d866494f3f9e7c19208eb7a6d02 100755
(executable)
--- 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
}