Always call pdb hook even if tty locking fails

310_plus
Tyler Goodlet 2022-04-11 17:09:14 -04:00
parent 3955906654
commit 20b902b300
1 changed files with 9 additions and 5 deletions

View File

@ -471,11 +471,15 @@ async def _breakpoint(
# we have to figure out how to avoid having the service nursery # we have to figure out how to avoid having the service nursery
# cancel on this task start? I *think* this works below? # cancel on this task start? I *think* this works below?
# actor._service_n.cancel_scope.shield = shield # actor._service_n.cancel_scope.shield = shield
with trio.CancelScope(shield=True): try:
await actor._service_n.start( with trio.CancelScope(shield=True):
wait_for_parent_stdin_hijack, await actor._service_n.start(
actor.uid, wait_for_parent_stdin_hijack,
) actor.uid,
)
except RuntimeError:
child_release_hook()
raise
elif is_root_process(): elif is_root_process():