mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Always set autoclose=false for IO.for_fd fds
* I believe this should be default behavior, see [Feature #2250]. * Now make test-spec MSPECOPT='-R100 spec/ruby/library/socket' works fine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bf4276b4a1
commit
7b37c8cdc5
2 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
fd = ARGV.shift.to_i
|
||||
|
||||
f = File.for_fd fd
|
||||
f = File.for_fd(fd)
|
||||
f.autoclose = false
|
||||
begin
|
||||
f.write "writing to fd: #{fd}"
|
||||
ensure
|
||||
|
|
|
@ -77,6 +77,7 @@ with_feature :unix_socket do
|
|||
@server_raw.bind(Socket.sockaddr_un(@path2))
|
||||
|
||||
@socket = UNIXSocket.for_fd(@server_raw.fileno)
|
||||
@socket.autoclose = false
|
||||
end
|
||||
|
||||
after do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue