The os package sets a finalizer on all Process values. Currently, on Unix, that finalizer does nothing useful. It should probably call wait on the process if that has not already been done, to remove the otherwise zombie process.
The text was updated successfully, but these errors were encountered:
SGTM. But if we have so many child processes, would that inflates the
number of OS threads to wait them? Perhaps we need to make the runtime
handles this better (e.g. lazily start a dedicated OS thread to do wait(2)).
Too late for Go 1.10, but I'd love to see this done by the runtime at some point. Zombie accumulation is one of my top 10 Go bugs. It's easy to diagnose and fix, but I wonder how many people don't do either.