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

[humble] Fix typo to properly restore SIGINT handler #1687

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

EricCousineau-TRI
Copy link

@EricCousineau-TRI EricCousineau-TRI commented Jun 2, 2024

@EricCousineau-TRI EricCousineau-TRI requested a review from a team as a code owner June 2, 2024 16:51
@EricCousineau-TRI EricCousineau-TRI requested review from MichaelOrlov and hidmic and removed request for a team June 2, 2024 16:51
@EricCousineau-TRI EricCousineau-TRI changed the title [rosbag2] Fix typo to properly restore SIGINT hanlder [rosbag2] Fix typo to properly restore SIGINT handler Jun 2, 2024
@EricCousineau-TRI
Copy link
Author

It appears that this typo is also present in iron, so I can retarget this PR + request backport, or we can forward port.
Please let me know which.

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

good eye 👁️ lgtm with green CI

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

@EricCousineau-TRI While changes in this PR will certainly fix a typo and will properly return the original signal handler for SIGINT, but it will not solve a problem reported in the #1686.

Among properly returning original signal handlers need yet memorize the deferred signal in the static member variable and call the original SIGINT handler on exit. See https://github.com/ros2/rosbag2/pull/1685/files#diff-c85fd024e7d68c762d60d25e2ba155bcc527f04c937ed09adc893ea241fdc61cR241-R254 for reference.

Also, I would encourage you to cherry-pick my newly added test_process_sigint_in_recorder(tmp_path, storage_id, capfd): unit test from the #1685
https://github.com/ros2/rosbag2/pull/1685/files#diff-f990d34f689d7cde53ab226e2b1b96b5573c4e050ccf698cc182e76bd72fc0eeR88-R129
tio make sure tha the original Python SIGINT handler called.

@MichaelOrlov MichaelOrlov changed the title [rosbag2] Fix typo to properly restore SIGINT handler [humble] Fix typo to properly restore SIGINT handler Jun 4, 2024
@MichaelOrlov
Copy link
Contributor

Pulls: #1687
Gist: https://gist.githubusercontent.com/MichaelOrlov/1b19779b38d132c8d347c6a3d4655481/raw/dc63ceb2b44ab11cb2cab457a6df42d697ad22dc/ros2.repos
BUILD args: --packages-above-and-dependencies ros2bag rosbag2_py
TEST args: --packages-above ros2bag rosbag2_py
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14041

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@MichaelOrlov MichaelOrlov merged commit b2277fa into ros2:humble Jun 6, 2024
14 checks passed
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

Successfully merging this pull request may close these issues.

3 participants