diff --git a/tractor/_entry.py b/tractor/_entry.py index 71dfdec..9099fc0 100644 --- a/tractor/_entry.py +++ b/tractor/_entry.py @@ -3,6 +3,7 @@ Process entry points. """ from functools import partial from typing import Tuple, Any +import signal import trio # type: ignore @@ -57,6 +58,10 @@ def _trio_main( ) -> None: """Entry point for a `trio_run_in_process` subactor. """ + # Disable sigint handling in children; + # we don't need it thanks to our cancellation machinery. + signal.signal(signal.SIGINT, signal.SIG_IGN) + # TODO: make a global func to set this or is it too hacky? # os.environ['PYTHONBREAKPOINT'] = 'tractor._debug.breakpoint'