• Cyril Brulebois's avatar
    Avoid zombies by reaping all child processes (refs: #14948). · cc86a75f
    Cyril Brulebois authored
    IO.popen makes it possible to start a command as a child process but it
    won't automatically reap the subprocess when it exits, leading to many
    zombies when running the automated test suite.
    
    Fix this in several ways depending on the call site:
    
     * Create an intermediary variable to hold the subprocess returned by
       IO.popen, making it possible to read its standard output, but also
       allowing to call its close method afterwards. This is less
       straightforward than a IO.popen().gets call, but allows for
       appropriate clean-up.
    
     * When the subprocess object itself (p) is available, add a "p.close"
       call after killing it through "Process.kill(signal, p.pid)".
    
     * Otherwise, when only the pid of the subprocess is available, call
       "Process.wait(pid)" after killing it.
    cc86a75f
Name
Last commit
Last update
auto Loading commit data...
bin Loading commit data...
config Loading commit data...
data Loading commit data...
debian Loading commit data...
features Loading commit data...
lib/python3 Loading commit data...
po Loading commit data...
submodules Loading commit data...
vagrant Loading commit data...
wiki Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
COPYING Loading commit data...
Changelog Loading commit data...
HACKING.mdwn Loading commit data...
README Loading commit data...
Rakefile Loading commit data...
build-website Loading commit data...
doc Loading commit data...
doc-source-relationships.yml Loading commit data...
ikiwiki-cgi.setup Loading commit data...
ikiwiki.setup Loading commit data...
import-translations Loading commit data...
refresh-translations Loading commit data...
release Loading commit data...
run_test_suite Loading commit data...