Skip to content

Commit

Permalink
PARENT_PID
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Sep 3, 2024
1 parent 7f9707b commit a41f316
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration_tests/light_iprof_only_sync.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit a41f316

Please sign in to comment.