Skip to content

Commit

Permalink
fix PARENT_PID
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Sep 3, 2024
1 parent a41f316 commit 3821b3a
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,6 @@
#!/bin/bash
set -euo pipefail

# For loging and Daemon to send signal to us
PARENT_PID=$$

Expand All @@ -14,7 +15,7 @@ RT_SIGNAL_FINISH=$((SIGRTMIN + 3))

# Signal handler for capturing signals
handle_signal() {
echo "$PARENT_PID $(date) | Received signal $1 from mpi_daemon"
echo "$PARENT_PID $(date) | Received signal $1 from sync_daemon"
if [ "$1" == "RT_SIGNAL_READY" ]; then
SIGNAL_RECEIVED="true"
fi
Expand All @@ -34,7 +35,7 @@ wait_for_signal() {
# before spawning or signaling the daemon
spawn_daemon_blocking() {
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 3821b3a

Please sign in to comment.