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 17, 2022
1 parent 3955906 commit 20b902b
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 20b902b

Please sign in to comment.