Skip to content

Avoid process deadlock in popen by consuming input pipes

Stan Hu requested to merge sh-fix-stderr-pipe-consumption into master

A process that spews a lot of output to stderr or stdout could stall out due to the pipe buffer being full. As described in https://bugs.ruby-lang.org/issues/9082, we can use the trick used in Ruby's capture3 function to read the pipes in separate threads.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6895

Edited by Stan Hu

Merge request reports