From 3c270ae2a823ae5bba256a59f19ccaa31f1b7ba6 Mon Sep 17 00:00:00 2001 From: Janis Dzerve Date: Wed, 18 Jan 2017 11:16:34 +0200 Subject: [PATCH] simulator: Do not kill every process with string 'px4' in the name --- Tools/sitl_multiple_run.sh | 3 ++- Tools/sitl_run.sh | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Tools/sitl_multiple_run.sh b/Tools/sitl_multiple_run.sh index 0626ed5ea4..82bf79f0d0 100755 --- a/Tools/sitl_multiple_run.sh +++ b/Tools/sitl_multiple_run.sh @@ -20,7 +20,8 @@ rc_script="posix-configs/SITL/init/ekf2/multiple_iris" build_path=${src_path}/build_posix_sitl_default echo "killing running instances" -pkill px4 +pkill -x px4 || true + sleep 1 cd $build_path diff --git a/Tools/sitl_run.sh b/Tools/sitl_run.sh index 7703b0171b..9c318f7b9b 100755 --- a/Tools/sitl_run.sh +++ b/Tools/sitl_run.sh @@ -57,8 +57,10 @@ fi # kill process names that might stil # be running from last time -pgrep gazebo && pkill gazebo -pgrep px4 && pkill px4 +pkill -x gazebo || true +pkill -x px4 || true +pkill -x px4_$model || true + jmavsim_pid=`ps aux | grep java | grep Simulator | cut -d" " -f1` if [ -n "$jmavsim_pid" ] then