apache and file's access time

Mikhail Teterin mi+dragonflybsd at aldan.algebra.com
Wed Nov 17 10:47:59 PST 2004


> To mmap(), one needs to open() -- at least once, after a restart of httpd
> or system reboot. open() would updated the atime. I think, Apache is doing
> sendfile(), actually, but that also needs a file descriptor and thus an
> open().

Indeed, simply opening a file does not update the access time. So the poor
thing can be open-ed, read through mmap or sendfile-ed without atime being
modified -- as long as read() is not used.

I guess, open's behavior is standard -- at least, Linux behaves the same
way. Not sure if sendfile or mmap should act differently, though...

Thanks for the hint! Yours,

        -mi





More information about the Users mailing list