mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
simulator: Do not kill every process with string 'px4' in the name
This commit is contained in:
committed by
Lorenz Meier
parent
6bcf9266dc
commit
3c270ae2a8
@@ -20,7 +20,8 @@ rc_script="posix-configs/SITL/init/ekf2/multiple_iris"
|
|||||||
build_path=${src_path}/build_posix_sitl_default
|
build_path=${src_path}/build_posix_sitl_default
|
||||||
|
|
||||||
echo "killing running instances"
|
echo "killing running instances"
|
||||||
pkill px4
|
pkill -x px4 || true
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
cd $build_path
|
cd $build_path
|
||||||
|
|||||||
+4
-2
@@ -57,8 +57,10 @@ fi
|
|||||||
|
|
||||||
# kill process names that might stil
|
# kill process names that might stil
|
||||||
# be running from last time
|
# be running from last time
|
||||||
pgrep gazebo && pkill gazebo
|
pkill -x gazebo || true
|
||||||
pgrep px4 && pkill px4
|
pkill -x px4 || true
|
||||||
|
pkill -x px4_$model || true
|
||||||
|
|
||||||
jmavsim_pid=`ps aux | grep java | grep Simulator | cut -d" " -f1`
|
jmavsim_pid=`ps aux | grep java | grep Simulator | cut -d" " -f1`
|
||||||
if [ -n "$jmavsim_pid" ]
|
if [ -n "$jmavsim_pid" ]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user