lib/cocaine/command_line/runners/process_runner.rb in cocaine-0.3.1 vs lib/cocaine/command_line/runners/process_runner.rb in cocaine-0.3.2
- old
+ new
@@ -4,12 +4,13 @@
if Process.respond_to?(:spawn)
def call(command, env = {})
input, output = IO.pipe
pid = spawn(env, command, :out => output)
- waitpid(pid)
output.close
- input.read
+ result = input.read
+ waitpid(pid)
+ result
end
private
def spawn(*args)