mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 01:08:26 -05:00
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:
@@ -65,6 +65,7 @@ class Albino
|
||||
stdin.puts @target
|
||||
stdin.close
|
||||
output = stdout.read.strip
|
||||
[stdout, stderr].each { |io| io.close }
|
||||
end
|
||||
output
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user