RFR 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
Alan Bateman
Alan.Bateman at oracle.com
Mon Sep 23 17:32:28 UTC 2019
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?
-Alan
More information about the nio-dev
mailing list