close open4 streams to prevent zombies
The popen4 that execs pygmetize leaves a bunch of zombie processes around unless these streams are closed for some reason. It's not too bad when running jekyll in one-shot mode but when running with --server --auto --pygmentize, I eventually get "fork: resource not available" errors :/ Closing the streams let's the processes die while the parent stays running.
This commit is contained in:
parent
2569e9fb5e
commit
c180bc47bf
|
@ -65,6 +65,7 @@ class Albino
|
|||
stdin.puts @target
|
||||
stdin.close
|
||||
output = stdout.read.strip
|
||||
[stdout, stderr].each { |io| io.close }
|
||||
end
|
||||
output
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue