Closed gsalgado closed 4 years ago
@pipermerriam added a new commit with more tests, and they exposed the need to kill the subproc when there's a timeout in open_in_process()
I don't know if it is helpful but, assuming this is an async generator issue, you might look at the code snippet in this comment:
https://github.com/python-trio/trio/issues/638#issuecomment-431954073
What was wrong?
open_in_process()
yielded as soon as the sub process reached the STARTED state, which is before the signal handlers have been setup, so a signal sent immediately after open_in_process() yielded would not be properly handledHow was it fixed?
Wait for proc to reach EXECUTING state before yielding. Also use a timeout when waiting so that we don't hang forever in case the process never reaches that state.