bpo-37137: Close pid waiters on watcher.close()#13792
bpo-37137: Close pid waiters on watcher.close()#13792asvetlov wants to merge 1 commit intopython:masterfrom
Conversation
|
I'm not sure this is correct... isn't it allowed to start a process through asyncio, and then for the parent process to exit and leave the child running? In trio we use the threaded strategy, and we make it a daemon thread and if the trio loop exits, oh well, the thread won't outlive either the host process or the watched process, so it's OK to leak it. To solve the test failures, maybe it's enough to say: the child process should be exited before the test finishes, and if the test waits to see that the child process has exited, then it's guaranteed that the thread has exited too. (If you want to be extra-certain, then the code that handles the child process notification in the main thread could call |
|
There are two things here:
|
|
...but how does this solve the test issues if no-one calls |
|
Well, you are right. |
To remove test warnings about dangling threads
https://bugs.python.org/issue37137