Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

handle SIGINT in rosbag play#2150

Merged
jacobperron merged 1 commit intoros:noetic-develfrom
pseyfert:sigint_play
Apr 6, 2021
Merged

handle SIGINT in rosbag play#2150
jacobperron merged 1 commit intoros:noetic-develfrom
pseyfert:sigint_play

Conversation

@pseyfert
Copy link
Copy Markdown
Contributor

This is copy&paste from https://github.com/ros/ros_comm/pull/2038/files#diff-8c5ae1a482044f103bf9b2fa9188ff9639ed617f259a8dd816075bc9e4005ef9R152
where the SIGINT handler was added to rosbag record.

Before the change, if I play a rosbag with

rosbag play mybag.bag

and then send INT to the python process

ps aux | grep play
...
pseyfert  8972  2.6  0.0 144336 54240 pts/3    S+   09:26   0:00 /usr/bin/python2 /opt/ros/melodic/bin/rosbag play mybag.bag
pseyfert  8991  3.4  0.0 492380 44296 pts/3    Sl+  09:26   0:00 /opt/ros/melodic/lib/rosbag/play --queue 100 --rate 1.0 --delay 0.2 --start 0.0 mybag.bag --rate-control-max-delay 1.0
...
kill -INT 8972

I would observe that the play process was still running (and printing to the terminal).

With the change in this MR, I observe that the play process also gets interrupted.

Copy link
Copy Markdown
Contributor

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants