1 |
commit: d00387e421e541bad7e3c16e2a7c67bc3c0a1cb7 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 2 17:33:03 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 2 17:33:03 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=d00387e4 |
7 |
|
8 |
gen_funcs.sh: gen_die(): Prevent recursion |
9 |
|
10 |
Closes: https://bugs.gentoo.org/704546 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
gen_funcs.sh | 8 ++++++++ |
14 |
1 file changed, 8 insertions(+) |
15 |
|
16 |
diff --git a/gen_funcs.sh b/gen_funcs.sh |
17 |
index 87e4b3a..1f574ad 100755 |
18 |
--- a/gen_funcs.sh |
19 |
+++ b/gen_funcs.sh |
20 |
@@ -407,6 +407,14 @@ gen_die() { |
21 |
# We died in a subshell! Let's trigger trap function... |
22 |
kill -s SIGTERM ${GK_MASTER_PID} |
23 |
else |
24 |
+ if [ -z "${GK_DIED_IN}" ] |
25 |
+ then |
26 |
+ GK_DIED_IN="$(get_useful_function_stack)" |
27 |
+ else |
28 |
+ # We are already dying |
29 |
+ exit 1 |
30 |
+ fi |
31 |
+ |
32 |
# Don't trust $LOGFILE before determine_real_args() was called |
33 |
if [ -n "${CMD_LOGFILE}" -a -s "${LOGFILE}" ] |
34 |
then |