ros_sugar.launch.signals#
SIGTERM for the launcher.
ROS launch before 3.10 registers a SIGTERM handler that cancels its run and orphans the processes, and never installs a Python-level handler for the signal, so a SIGTERM ends the launcher process at once instead.
Fixed by ros2/launch#712. This does the same on the launch versions that lack it. (Humble, Jazzy, Kilted, Lyrical)
Module Contents#
Functions#
Whether this launch shuts down on SIGTERM by itself (ros2/launch#712) |
|
Have SIGTERM shut |
API#
- ros_sugar.launch.signals.launch_handles_sigterm() bool#
Whether this launch shuts down on SIGTERM by itself (ros2/launch#712)
- ros_sugar.launch.signals.sigterm_shuts_down(launch_service: launch.LaunchService) Iterator[None]#
Have SIGTERM shut
launch_servicedown like SIGINT while it runs.launch registers its signal handlers on its manager as the run starts. The manager’s
handleis wrapped for the run, so the SIGTERM registration becomes a shutdown, and a Python-level handler is installed so the signal reaches the manager instead of ending the process.