8220793: (fs) No support for changing modification time of symlink

Brian Burkhalter brian.burkhalter at oracle.com
Wed Apr 24 23:11:25 UTC 2019


> On Apr 22, 2019, at 11:19 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
>> On Apr 22, 2019, at 12:36 AM, Alan Bateman <Alan.Bateman at oracle.com <mailto:Alan.Bateman at oracle.com>> wrote:
>> 
>> On 19/04/2019 01:24, Brian Burkhalter wrote:
>>> For issue [1] please review the patch [2]. It implements setting the access and modification times of an unfollowed symbolic link on Linux and macOS.
>>> 
>>> The patch uses the library function lutimes(3). The supported Unix platforms for lutimes() appear to be Linux and the BSDs, but neither Solaris (verified) nor AIX. Therefore the native function lutimes0() is a no-op for Unix platforms other than Linux and the BSDs.
>>> 
>> I'm in two minds on this, mostly because it should be very rare to want to change the the time stamps of a symbolic link.
>> 
>> In any case, can you double check setTimes - I assume it should not attempt to open the file when lutimes is available and the file is a sym link.
> 
> It will only if just one of the times is being modified (lines 99-111).
> 
> Also I neglected to put it in the retry section (lines 136-148) and that should likely be added.

I added lutimes() to the retry section (lines 140-141) [1, 2].

Thanks,

Brian

[1] http://cr.openjdk.java.net/~bpb/8220793/webrev.00-01/
[2] http://cr.openjdk.java.net/~bpb/8220793/webrev.01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190424/8bbae85f/attachment.html>


More information about the nio-dev mailing list