mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
GNU make 4.4 now uses a fifo for the jobserver
This commit is contained in:
parent
fc842c9ccc
commit
12883f8fa6
1 changed files with 8 additions and 3 deletions
|
@ -286,10 +286,15 @@ module Test
|
|||
@jobserver = nil
|
||||
makeflags = ENV.delete("MAKEFLAGS")
|
||||
if !options[:parallel] and
|
||||
/(?:\A|\s)--jobserver-(?:auth|fds)=(\d+),(\d+)/ =~ makeflags
|
||||
/(?:\A|\s)--jobserver-(?:auth|fds)=(?:(\d+),(\d+)|fifo:(.*))/ =~ 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
|
||||
r = File.open(fifo, IO::RDONLY|IO::NONBLOCK|IO::BINARY, autoclose: false)
|
||||
w = File.open(fifo, IO::WRONLY|IO::NONBLOCK|IO::BINARY, autoclose: false)
|
||||
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
|
||||
r.close if r
|
||||
nil
|
||||
|
|
Loading…
Reference in a new issue