QUERY · ISSUE
popen leaves zombie processes
bug
I discuss this here. The zombie processes make it hard to use if it is called continuously. I reverted to piping to file and reading the output.
CANDIDATE · PULL REQUEST
unix-ffi: Fixing behavior to avoid zombie threads.
This commit is fixing this issue:
https://github.com/micropython/micropython-lib/issues/780
As discussed here https://github.com/orgs/micropython/discussions/13239
Now the pid of child thread will be stored and closed properly. Even with context manager.
bump up
It would be good to add a test for this functionality,
that also helps with maintaining stability over time.
Other tests for the ffi module live in the micropython repo under tests/ports/unix
you could take one of the other ffi_ tests as the base, and add example code to it.
I'll update the PR.
Thanks for the ideas, folks =)