forked from goodboy/tractor
1
0
Fork 0

Compare commits

...

1 Commits

Author SHA1 Message Date
Tyler Goodlet 29fd956077 Make SIGINT handler kill the process tree
The std lib's `pdb` internals override SIGINT handling whenever one
enters the debugger repl. Force a handler that kills the tree if SIGINT
is triggered from the root actor, otherwise igore it since supervised
children should be managed already. This resolves an issue with guest
mode where `pdb` causes SIGINTs to be swallowed resulting in the host
loop never terminating the process tree.
2021-04-27 11:35:35 -04:00
1 changed files with 1 additions and 0 deletions

View File

@ -248,6 +248,7 @@ def _breakpoint(debug_func) -> Awaitable[None]:
# may have the tty locked prior # may have the tty locked prior
if _debug_lock.locked(): # root process already has it; ignore if _debug_lock.locked(): # root process already has it; ignore
return return
await _debug_lock.acquire() await _debug_lock.acquire()
_pdb_release_hook = _debug_lock.release _pdb_release_hook = _debug_lock.release