Using block syntax of popen4 to ensure that subprocesses are properly disposed of.
This fixes resource unavailable errors when jekyll is run with '--auto --pygments': Liquid error: Resource temporarily unavailable – fork(2) fork: Resource temporarily unavailable
This commit is contained in:
parent
82d96448b5
commit
2135a53897
|
@ -60,10 +60,13 @@ class Albino
|
|||
end
|
||||
|
||||
def execute(command)
|
||||
pid, stdin, stdout, stderr = Open4.popen4(command)
|
||||
output = ''
|
||||
Open4.popen4(command) do |pid, stdin, stdout, stderr|
|
||||
stdin.puts @target
|
||||
stdin.close
|
||||
stdout.read.strip
|
||||
output = stdout.read.strip
|
||||
end
|
||||
output
|
||||
end
|
||||
|
||||
def colorize(options = {})
|
||||
|
|
Loading…
Reference in New Issue