From 0ac3397dbbd28c25ed739cda7b53bd474b955222 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 28 Nov 2021 12:48:00 -0500 Subject: [PATCH] Only soft-acquire debug lock if a proc was spawned --- tractor/_spawn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tractor/_spawn.py b/tractor/_spawn.py index da4b2c8..3857f36 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -256,7 +256,8 @@ async def new_proc( # don't clobber an ongoing pdb if is_root_process(): await maybe_wait_for_debugger() - else: + + elif proc is not None: async with acquire_debug_lock(uid): # soft wait on the proc to terminate with trio.move_on_after(0.5):