This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: atime preservation


> This is a Linux kernel issue.  I agree it would be best if Linux would
> fail with EINVAL when given flags it cannot implement.

Right. I just wanted to discuss including this possibility in the glibc 
documentation.

> > 2) new system calls readlinkopt() and opendiropt(), which work like
> > readlink() and opendir() but take an extra flag argument, the only flag
> > (at present) being O_NOATIME. They set EINVAL if the file is not a
> > symbolic link (for readlinkopt()) or does not support a passed flag.
>
> opendir is not a system call.  readlink is.  For readlink to behave
> differently, you need kernel support that behaves differently.  This is not
> the place to request that.  opendir could behave differently by passing
> different flags to open.  It is probably more useful to have an opendirfd
> or suchlike that takes a file descriptor you've opened however you like.
> Does using opendir on /dev/fd/NN give you the behavior you want?

readlink() would have to be a new system call, but I figure the libc folks 
have as much to say as the kernel folks about the form that system call 
should take.

opendirfd() would be fine. The Linux documentation says not to use O_DIRECTORY 
outside of an implementation of opendir(), but that could be changed.

In Linux, O_NOATIME is a fd-specific flag, and opening from /proc/self/fd/ 
generates a new fd, not just a new name for the old one. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]