launch_local_testnet.sh: re-add targetting parent PID (#4680)

Otherwise we kill of other unrelated processes.

Fix for bug introduced most probably in:
https://github.com/status-im/nimbus-eth2/pull/4551

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-02-28 11:39:39 +01:00 committed by GitHub
parent f2a09802b1
commit f46ed12f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -751,9 +751,9 @@ cleanup() {
echo "Terminating:"
for proc in "${PROCS_TO_KILL[@]}"; do
# FIXME We should be using '-P $$' here but it doesn't always work.
PROC_NAME=$(basename "$proc")
pkill -SIGTERM "${PKILL_ECHO_FLAG}" -f "${PROC_NAME}" \
# WARNING: The '-P $$' avoids killing unrelated processes.
pkill -SIGTERM "${PKILL_ECHO_FLAG}" -P $$ "${PROC_NAME}" \
|| echo "Nothing to terminate: ${PROC_NAME}"
done
@ -761,9 +761,9 @@ cleanup() {
echo "Killing:"
for proc in "${PROCS_TO_KILL[@]}"; do
# FIXME We should be using '-P $$' here but it doesn't always work.
PROC_NAME=$(basename "$proc")
pkill -SIGKILL "${PKILL_ECHO_FLAG}" -f "${PROC_NAME}" \
# WARNING: The '-P $$' avoids killing unrelated processes.
pkill -SIGKILL "${PKILL_ECHO_FLAG}" -P $$ "${PROC_NAME}" \
|| echo "Nothing to kill: ${PROC_NAME}"
done