Skip to content

Commit c5ff7d4

Browse files
committed
Add default Python signal handler for all signals registered.
By default, and only in certain circumstances, SIGINT is the only signal with a handler installed. All others will perform their function defined by SIG_DFL, which is to ignore is some cases, and to terminate in others. In either case, Python will never see them and be unable to pass them to the async handler. Signed-off-by: <[email protected]> Signed-off-by: Cian Donovan <[email protected]>
1 parent 8cfa723 commit c5ff7d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

launch/launch/utilities/signal_management.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def handle(
232232
:return: previous handler if any, otherwise None
233233
"""
234234
signum = signal.Signals(signum)
235+
signal.signal(signum, signal.default_int_handler)
235236
if handler is not None:
236237
if not callable(handler):
237238
raise ValueError('signal handler must be a callable')

0 commit comments

Comments
 (0)