From 9650055519a325ac057240b64996cd1f7a4b3088 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 21 Jan 2022 09:05:35 -0500 Subject: [PATCH] Use `.exitcode` which is poll + error handling --- tractor/_spawn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tractor/_spawn.py b/tractor/_spawn.py index f15f7b3..3d7e6b1 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -526,7 +526,7 @@ async def mp_new_proc( # XXX: monkey patch poll API to match the ``subprocess`` API.. # not sure why they don't expose this but kk. - proc.poll = proc._popen.poll # type: ignore + proc.poll = lambda: proc.exitcode # type: ignore # except: # TODO: in the case we were cancelled before the sub-proc