commit: 625690fe22734f9290fecc7631809a971a01b40e
Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Tue Feb 15 21:26:24 2022 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Feb 15 21:26:24 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=625690fe
die: do not kill $EBUILD_MASTER_PID if it isn't yet setup
If die is used during the depend phase, EBUILD_MASTER_PID isn't setup,
and the kill call here prints a confusing error message. Just skip
the step entirely if $EBUILD_MASTER_PID isn't set.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
bin/isolated-functions.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 6d9b73474..51678958b 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -233,7 +233,9 @@ die() {
[[ -n $PORTAGE_IPC_DAEMON ]] && "$PORTAGE_BIN_PATH"/ebuild-ipc exit 1
# subshell die support
- [[ ${BASHPID:-$(__bashpid)} == ${EBUILD_MASTER_PID} ]] || kill -s
SIGTERM ${EBUILD_MASTER_PID}
+ if [[ -n ${EBUILD_MASTER_PID} && ${BASHPID:-$(__bashpid)} !=
${EBUILD_MASTER_PID} ]] ; then
+ kill -s SIGTERM ${EBUILD_MASTER_PID}
+ fi
exit 1
}