diff --git a/rosbag2_py/src/rosbag2_py/_transport.cpp b/rosbag2_py/src/rosbag2_py/_transport.cpp index 1b8129e794..935d8c5260 100644 --- a/rosbag2_py/src/rosbag2_py/_transport.cpp +++ b/rosbag2_py/src/rosbag2_py/_transport.cpp @@ -203,7 +203,7 @@ class Recorder std::signal(SIGTERM, old_sigterm_handler); } if (old_sigint_handler != SIG_ERR) { - std::signal(SIGTERM, old_sigint_handler); + std::signal(SIGINT, old_sigint_handler); } throw; } @@ -212,7 +212,7 @@ class Recorder std::signal(SIGTERM, old_sigterm_handler); } if (old_sigint_handler != SIG_ERR) { - std::signal(SIGTERM, old_sigint_handler); + std::signal(SIGINT, old_sigint_handler); } }