From 24a062341ebcfcb1c4b1cfe4e861c432e9f32765 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 2 Apr 2023 14:34:41 -0400 Subject: [PATCH] Just call `trio.Process.aclose()` directly for now? --- tractor/_spawn.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tractor/_spawn.py b/tractor/_spawn.py index 900aea2..7601c03 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -206,10 +206,8 @@ async def do_hard_kill( # never release until the process exits, now it acts as # a hard-kill time ultimatum. with trio.move_on_after(terminate_after) as cs: - - # NOTE: This ``__aexit__()`` shields internally. - async with proc: # calls ``trio.Process.aclose()`` - log.debug(f"Terminating {proc}") + log.debug(f"Terminating {proc}") + await proc.aclose() if cs.cancelled_caught: # XXX: should pretty much never get here unless we have