Skip to content

Commit

Permalink
redirect to kill command to std_err
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed May 22, 2018
1 parent 26e8a74 commit b332777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gazebo_ros/scripts/gazebo
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ final=$(relocate_remappings "${final}")
GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" gzserver $final &
gzserver_pid="$!"
# Use kill -0 to check if the process is running
if $(kill -0 $! > /dev/null); then
if $(kill -0 $! 2> /dev/null); then
GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" gzclient $client_final
fi

# Kill the server if it is alive
if $(kill -0 $! > /dev/null); then
if $(kill -0 $! 2> /dev/null); then
# -2 SIGINT valid for Linux and Mac
kill -2 $!
fi

0 comments on commit b332777

Please sign in to comment.