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

Gracefully handle CTRL+C and CTR+Break events on Windows #1342

Open
wants to merge 4 commits into
base: rolling
Choose a base branch
from

Commits on Jan 30, 2024

  1. Gracefully handle CTRL+C and CTR+Break events on Windows

    - Add handler for the native Windows CTRL_C_EVENT, CTRL_BREAK_EVENT and
    CTRL_CLOSE_EVENT in rosbag2 recorder and player.
    - Map SIGINT signal to the native Windows CTRL_C_EVENT in the
     stop_execution(handle, signum) version for Windows. To be able
     correctly use start and stop execution routines from unit tests.
    - Enable integration tests which was disabled for Windows due to the
    incorrect sending and handling of the SIGINT event.
    - Got rid of the `finalize_metadata_kludge(..)` helper function.
    
    Signed-off-by: Michael Orlov <[email protected]>
    MichaelOrlov committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9a07a5e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    641c98a View commit details
    Browse the repository at this point in the history
  3. Reduce flakiness in ros2bag record tests via fixing their expectations

    - Replace waiting for the `/rosout` topic on waiting for the rosbag2
    internal `/events/write_split`. Rationale:
    The `/rosout` topic may not be enabled on the CI.
    - Replace expectation for the `Listening for topics...` on
    `Recording...` which is appearing at the very end of the
    Recorder::record(). Rationale:
    It was possible a race condition when test was
    sending the SIGINT while we haven't yet finished call for
    Recorder::record().
    
    Signed-off-by: Michael Orlov <[email protected]>
    MichaelOrlov committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f522b0f View commit details
    Browse the repository at this point in the history
  4. Add basic ctrl_c_event_can_be_send_and_received test

    Signed-off-by: Michael Orlov <[email protected]>
    MichaelOrlov committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    cb7b410 View commit details
    Browse the repository at this point in the history