[9] RFR of 8139133: Changing the modification time on a unix domain socket file fails

Brian Burkhalter brian.burkhalter at oracle.com
Wed Oct 21 15:16:03 UTC 2015


On Oct 20, 2015, at 6:27 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 21/10/2015 02:05, Brian Burkhalter wrote:
>> Please review at your convenience.
>> 
>> Issue:	https://bugs.openjdk.java.net/browse/JDK-8139133
>> Patch:	http://cr.openjdk.java.net/~bpb/8139133/webrev.00/
>> 
>> The exception is caused by the native open(2) system call's failing with errno ENXIO, "No such device or address.” The fix is to use equivalent methods which do not depend on the file descriptor’s being available.
>> 
> Catching IOException doesn't look right. Instead, I think this will need re-visiting openForAttributeAccess so that you can examine the errno and only fallback to the file path for ENXIO and maybe a few other errors.

That was more or less what I intended to do in the first place but opted for a simpler change. I think your suggestion is safer however.

> A minor comment is renaming isFdValid to haveFd could make the usages a bit clearer.
> 
> Does the test have a race? It looks like it might attempt to accept the socket file before the nc command creates it.

I’ll investigate.

> Also can the test be moved to attribute/BasicFileAttributeView as that is where the tests for setTimes are (it's not a test for the FileTime class).

OK.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20151021/45d4b722/attachment-0001.html>


More information about the nio-dev mailing list