1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Set autoclose: for inherited FDs only [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2022-11-07 09:06:15 +09:00
parent 12883f8fa6
commit 180d37c817
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -289,8 +289,8 @@ module Test
/(?:\A|\s)--jobserver-(?:auth|fds)=(?:(\d+),(\d+)|fifo:(.*))/ =~ makeflags
begin
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)
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)