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

Brian Burkhalter brian.burkhalter at oracle.com
Wed Dec 2 01:45:15 UTC 2015


Reprising this review after some time.

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.
> 
> 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. 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).

An updated version of the patch may be found here:

http://cr.openjdk.java.net/~bpb/8139133/webrev.01/

Thanks,

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


More information about the nio-dev mailing list