Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctrl-q doesn't tear down gzserver #485

Closed
jacquelinekay opened this issue Aug 30, 2016 · 2 comments
Closed

ctrl-q doesn't tear down gzserver #485

jacquelinekay opened this issue Aug 30, 2016 · 2 comments

Comments

@jacquelinekay
Copy link
Contributor

On 16.04 with the ros-kinetic-gazebo-ros debian, whenever I use CTRL-Q to exit Gazebo launched with rosrun gazebo_ros gazebo, I get the following error message:

/opt/ros/kinetic/lib/gazebo_ros/gazebo: 36: kill: invalid signal number or name: SIGINT

The gzserver process remains alive in the background and I have to kill it manually.

@scpeters
Copy link
Member

The signal names seem to have changed on some OS's. We fixed OSX in #364 but haven't fixed xenial yet. I suggested the following in #364 (comment) but I haven't tested it:

diff --git a/gazebo_ros/scripts/gazebo b/gazebo_ros/scripts/gazebo
index 392dac7..3edbf83 100755
--- a/gazebo_ros/scripts/gazebo
+++ b/gazebo_ros/scripts/gazebo
@@ -6,10 +6,8 @@ final="$@"
 final=`echo "$final" | sed 's/[^ ]*:=[^ ]* \?//g'`

 EXT=so
-SIGNAL=SIGINT
 if [ $(uname) = "Darwin" ]; then
     EXT=dylib
-    SIGNAL=INT
 fi

 # add ros path plugin if it does not already exist in the passed in arguments
@@ -40,4 +38,4 @@ GAZEBO_MASTER_URI="$desired_master_uri" gzserver $final &
 GAZEBO_MASTER_URI="$desired_master_uri" gzclient $client_final

 # Kill the server
-kill -s $SIGNAL $!
+kill -n 2 $!

@scpeters
Copy link
Member

fixed in #711 for lunar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants