-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the SIGTERM handling in the ros2 daemon. (#887)
* Fix the SIGTERM handling in the ros2 daemon. There are 2 fixes needed here: 1. Make sure to check rclpy.ok() in the overall loop for handling requests. That's because rclpy is handling the signals by default. 2. Realize that server.handle_request() uses the set timeout as a timeout to select(), essentially. Because of that, we instead set the timeout to a short value (200 milliseconds), and do the overall timeout checking ourselves. Note that because we are waking up more often, this will cause the ros2 daemon to use more CPU than before. But it should be negligible overall. Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Scott K Logan <[email protected]>
- Loading branch information
1 parent
d3cfbd7
commit b16fb02
Showing
1 changed file
with
78 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters