Only soft-acquire debug lock if a proc was spawned

acked_backup
Tyler Goodlet 2021-11-28 12:48:00 -05:00
parent 62b2867e07
commit 0ac3397dbb
1 changed files with 2 additions and 1 deletions

View File

@ -256,7 +256,8 @@ async def new_proc(
# don't clobber an ongoing pdb # don't clobber an ongoing pdb
if is_root_process(): if is_root_process():
await maybe_wait_for_debugger() await maybe_wait_for_debugger()
else:
elif proc is not None:
async with acquire_debug_lock(uid): async with acquire_debug_lock(uid):
# soft wait on the proc to terminate # soft wait on the proc to terminate
with trio.move_on_after(0.5): with trio.move_on_after(0.5):