Skip to content
Snippets Groups Projects
Commit 628d4ccb authored by Carmelo Pellegrino's avatar Carmelo Pellegrino
Browse files

correcting implementation of process cleanup

parent da50dfd3
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ function on_exit() {
rm_lock
fi
for pid in ${PROCS}; do
for pid in ${PROCS[*]}; do
kill -9 ${pid}
done
}
......@@ -137,8 +137,7 @@ run_number=`get_run_number`
daq_log_file=~/.km3_private/daq_${run_number}.log
JGetMessage -H localhost -T MSG -d 3 >${daq_log_file} &
PROCS=(${PROCS} $!)
## impl: get the pid and add to the list of must_kill_at_the_exit
PROCS=(${PROCS[*]} $!)
# Copy selected run setup file, changing the run number
cat ${rs_file} | sed -e 's/RUNNUMBER/${run_number}/' >dm.detectorfile
......@@ -147,7 +146,7 @@ run_start_time=`nowUTC`
# Launch the DM
dm_driver ${run_duration} | mono DetectorControl.exe --control --reset &
PROCS=(${PROCS} $!)
PROCS=(${PROCS[*]} $!)
# Launch the DAQ
log "Launching the DAQ with the following command line: daq.sh ${run_number} ${run_start_time} ${run_duration}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment