Skip to content

Commit

Permalink
Always call pdb hook even if tty locking fails
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Apr 12, 2022
1 parent 8c054a0 commit 202ef63
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tractor/_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,15 @@ def child_release_hook():
# we have to figure out how to avoid having the service nursery
# cancel on this task start? I *think* this works below?
# actor._service_n.cancel_scope.shield = shield
with trio.CancelScope(shield=True):
await actor._service_n.start(
wait_for_parent_stdin_hijack,
actor.uid,
)
try:
with trio.CancelScope(shield=True):
await actor._service_n.start(
wait_for_parent_stdin_hijack,
actor.uid,
)
except RuntimeError:
child_release_hook()
raise

elif is_root_process():

Expand Down

0 comments on commit 202ef63

Please sign in to comment.