# File lib/r10k/util/subprocess/runner/posix.rb, line 23 def run # Create a pipe so that the parent can verify that the child process # successfully executed. The pipe will be closed on a successful exec(), # and will contain an error message on failure. exec_r, exec_w = pipe @stdout_pump = R10K::Util::Subprocess::Runner::Pump.new(@stdout_r) @stderr_pump = R10K::Util::Subprocess::Runner::Pump.new(@stderr_r) @stdout_pump.start @stderr_pump.start pid = fork do exec_r.close execute_child(exec_w) end exec_w.close execute_parent(exec_r, pid) @result end