Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Commit

Permalink
Read spawn output in segments, maybe fix rbx?
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed Aug 9, 2013
1 parent 86a2d52 commit f26304a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cocaine/command_line/runners/posix_runner.rb
Expand Up @@ -9,7 +9,10 @@ def call(command, env = {})
input, output = IO.pipe
pid = spawn(env, command, :out => output)
output.close
result = input.read
result = ""
while partial_result = input.read(8192)
result << partial_result
end
waitpid(pid)
result
end
Expand Down

0 comments on commit f26304a

Please sign in to comment.