You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a buildpack customization, I execute a shell command that produces a lot of stdout/stderr. When I do the buildpack staging stalls. It appears this is happening because the thread will stall if it cannot write all output to stdout and stderr.
This doesn't appear to affect other buildpack commands because the stdout/stderr buffers are large enough to hold all their command output.
Changing the implementation to the following worked around my problem:
Open3.popen3(*args) do |_stdin, stdout, stderr, wait_thr|
stdout = stdout.gets nil
stderr = stderr.gets nil
unless wait_thr.value.success?
puts "\nCommand '#{args.join ' '}' has failed"
puts "STDOUT: #{stdout}"
puts "STDERR: #{stderr}"
raise
end
end
The text was updated successfully, but these errors were encountered:
https://github.com/cloudfoundry/java-buildpack/blob/master/lib/java_buildpack/util/shell.rb
In a buildpack customization, I execute a shell command that produces a lot of stdout/stderr. When I do the buildpack staging stalls. It appears this is happening because the thread will stall if it cannot write all output to stdout and stderr.
This doesn't appear to affect other buildpack commands because the stdout/stderr buffers are large enough to hold all their command output.
Changing the implementation to the following worked around my problem:
The text was updated successfully, but these errors were encountered: