diff options
Diffstat (limited to 'bootstraptest')
-rwxr-xr-x | bootstraptest/runner.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 1d219be71e..f9b3e919b8 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -108,10 +108,16 @@ BT = Class.new(bt) do def wn=(wn) unless wn == 1 - if /(?:\A|\s)--jobserver-(?:auth|fds)=\K(\d+),(\d+)/ =~ ENV.delete("MAKEFLAGS") + if /(?:\A|\s)--jobserver-(?:auth|fds)=(?:(\d+),(\d+)|fifo:((?:\\.|\S)+))/ =~ ENV.delete("MAKEFLAGS") begin - r = IO.for_fd($1.to_i(10), "rb", autoclose: false) - w = IO.for_fd($2.to_i(10), "wb", autoclose: false) + if fifo = $3 + fifo.gsub!(/\\(?=.)/, '') + r = File.open(fifo, IO::RDONLY|IO::NONBLOCK|IO::BINARY) + w = File.open(fifo, IO::WRONLY|IO::NONBLOCK|IO::BINARY) + else + r = IO.for_fd($1.to_i(10), "rb", autoclose: false) + w = IO.for_fd($2.to_i(10), "wb", autoclose: false) + end rescue => e r.close if r else |