From f831cc6cfa5aed69dbe913a784ff87eb19a29708 Mon Sep 17 00:00:00 2001 From: jgoppert Date: Sun, 25 Oct 2015 12:33:48 -0400 Subject: [PATCH] Don't kill if jmavsim not found. --- Tools/sitl_run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/sitl_run.sh b/Tools/sitl_run.sh index 943cf05cda..9d950dc946 100755 --- a/Tools/sitl_run.sh +++ b/Tools/sitl_run.sh @@ -20,7 +20,12 @@ fi # kill process names that might stil # be running from last time pkill mainapp -kill -9 `jps | grep Simulator | cut -d" " -f1` +jmavsim_pid=`jps | grep Simulator | cut -d" " -f1` +echo jmavsim_pid=\"${jmavsim_pid}\" +if [ -n "$jmavsim_pid" ] +then + kill $jmavsim_pid +fi cp Tools/posix_lldbinit $build_path/src/firmware/posix/.lldbinit cp Tools/posix.gdbinit $build_path/src/firmware/posix/.gdbinit