2
0
mirror of https://github.com/status-im/nimbus-eth2.git synced 2025-01-12 15:24:14 +00:00

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

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

@ -751,9 +751,9 @@ cleanup() {
echo "Terminating:" echo "Terminating:"
for proc in "${PROCS_TO_KILL[@]}"; do for proc in "${PROCS_TO_KILL[@]}"; do
# FIXME We should be using '-P $$' here but it doesn't always work.
PROC_NAME=$(basename "$proc") 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}" || echo "Nothing to terminate: ${PROC_NAME}"
done done
@ -761,9 +761,9 @@ cleanup() {
echo "Killing:" echo "Killing:"
for proc in "${PROCS_TO_KILL[@]}"; do for proc in "${PROCS_TO_KILL[@]}"; do
# FIXME We should be using '-P $$' here but it doesn't always work.
PROC_NAME=$(basename "$proc") 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}" || echo "Nothing to kill: ${PROC_NAME}"
done done