1 |
On Dienstag, 30. September 2008, Thomas Sachau wrote: |
2 |
> |
3 |
> From my knowledge and experience with sunrise: |
4 |
> |
5 |
> some functions that dont need "|| die": |
6 |
> epatch, econf, eqmake3, eqmake4 |
7 |
> |
8 |
> some functions that need "|| die": |
9 |
> emake, do* |
10 |
> |
11 |
> Afaik die wont work in a subshell independent of how it is called, so the |
12 |
> die from econf wont work, but also the "emake || die" one would also not |
13 |
> work. |
14 |
|
15 |
Well there might be some cases when die does not work fine, I am not sure. |
16 |
But it IS designed to work in subshells. |
17 |
Looking into /usr/lib/portage/bin/isolated-functions.sh: die basically calls |
18 |
kill -s SIGTERM ${EBUILD_MASTER_PID} |
19 |
|
20 |
|
21 |
and sigterm is catched in /usr/lib/portage/bin/ebuild.sh |
22 |
|
23 |
# subshell die support |
24 |
EBUILD_MASTER_PID=$$ |
25 |
trap 'exit 1' SIGTERM |
26 |
|
27 |
and btw. econf is also implemented as a function in ebuild.sh so it even is |
28 |
executed inside the "main" ebuild bash process - no subshell here. |
29 |
|
30 |
Regards |
31 |
Matthias |