From a41f3164b00a3a100c3f732f6484a835c62cbb3a Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Tue, 3 Sep 2024 16:31:15 +0000 Subject: [PATCH] PARENT_PID --- integration_tests/light_iprof_only_sync.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integration_tests/light_iprof_only_sync.sh b/integration_tests/light_iprof_only_sync.sh index 908c7ace..20683ee2 100755 --- a/integration_tests/light_iprof_only_sync.sh +++ b/integration_tests/light_iprof_only_sync.sh @@ -1,5 +1,7 @@ #!/bin/bash set -euo pipefail +# For loging and Daemon to send signal to us +PARENT_PID=$$ # Get base real-time signal number SIGRTMIN=$(kill -l SIGRTMIN) @@ -31,9 +33,8 @@ wait_for_signal() { # To avoid race condition, `SIGNAL_RECEIVED` need to be set # before spawning or signaling the daemon spawn_daemon_blocking() { - local parent_pid=$$ SIGNAL_RECEIVED="false" - "${THAPI_BIN_DIR}"/sync_daemon_"${THAPI_SYNC_DAEMON}" parent_pid & + "${THAPI_BIN_DIR}"/sync_daemon_"${THAPI_SYNC_DAEMON}" PARENT_PID & DAEMON_PID=$! wait_for_signal }