This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
utimensat and AT_EMPTY_PATH
- From: Ian Pilcher <arequipeno at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Mon, 10 Apr 2017 11:05:24 -0500
- Subject: utimensat and AT_EMPTY_PATH
- Authentication-results: sourceware.org; auth=none
Given a file descriptor that refers to a symbolic link, is there a way
to call utimensat (or some other function) to update its timestamp?
I.e. what I would like to do is:
utimensat(linkfd, "", times, AT_EMPTY_PATH);
Unlike futimens, utimensat *can* update the timestamp of a symlink
(verified with "strace touch -h ..."), but it doesn't seem to accept
AT_EMPTY_PATH.
Is there any non-racy way to do this?
--
========================================================================
Ian Pilcher arequipeno@gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================