RFR: 8280944: Enable Unix domain sockets in Windows Selector notification mechanism [v2]

Michael McMahon michaelm at openjdk.java.net
Wed Feb 2 12:08:08 UTC 2022


On Wed, 2 Feb 2022 11:42:30 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Michael McMahon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   after review comments
>
> src/java.base/windows/classes/sun/nio/ch/PipeImpl.java line 223:
> 
>> 221:             try {
>> 222:                 listener = ServerSocketChannel.open(UNIX);
>> 223:                 listener.bind(null);
> 
> Updating version looks okay, I just wondering if bind can fail, in which case it would leak a socket.

bind would only fail if it can't find a random unique name in the temp directory. Probability low, but not zero. It doesn't cost much to check if listener != null and close it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7302


More information about the nio-dev mailing list