RFR 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
Michael McMahon
michael.x.mcmahon at oracle.com
Mon Sep 23 18:04:32 UTC 2019
On 23/09/2019, 18:32, Alan Bateman wrote:
> On 23/09/2019 17:56, Michael McMahon wrote:
>> Okay, I see the reason for it now. It is the potential race when
>> closing a socket
>> and its file descriptor possibly being reassigned to another opened
>> file, at the same time
>> as another thread starting an I/O operation on the original socket.
>>
>> I have added the two stage close logic similar to SocketChannel and
>> the Source/SinkChannels you
>> mentioned.
>>
>> Updated webrev at:
>> http://cr.openjdk.java.net/~michaelm/8231187/webrev.2/index.html
> UnixDomainSocketImpl looks right now, trivially you can drop fdVal as
> that shouldn't be needed.
>
> Did you consider the comment to return null when addressFamily is
> AF_UNKNOWN?
>
I've just updated the webrev in place with those changes.
Thanks,
Michael.
> -Alan
More information about the nio-dev
mailing list