Closed mfisher31 closed 5 months ago
Thank you for reporting.
On Linux a terminated subprocess will not be cleaned up until its return value is collected. To do that "manually" one needs to call ChildProcess::isFinished() until it returns false or ChildProcess::waitForProcessToFinish() until it returns true.
With the following commit we added a helper class, ChildProcessManager
, which will keep trying to collect the return value on a Timer callback, as long as the application is running.
To use this facility, you need to create and start your process with ChildProcessManager:: createAndStartManagedChildProcess
.
https://github.com/juce-framework/JUCE/commit/0611baf1bead530fb0ec1998391dc251396b775a
That's great, thank you!
Detailed steps on how to reproduce the bug
As a workaround I handle SIGCHLD like:
signal(SIGCHLD, SIG_IGN); /* Silently (and portably) reap children. */
What is the expected behaviour?
Zombie processes not to be created when using juce::ChildProcess
Operating systems
Linux
What versions of the operating systems?
Any version of Linux probably, but I use Ubuntu 20.04
Architectures
x86_64, 64-bit
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
develop
branchI have not tested against the
develop
branchCode of Conduct