DragonFly BSD
DragonFly users List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: apache and file's access time


From: Mikhail Teterin <mi+dragonflybsd@xxxxxxxxxxxxxxxxx>
Date: Wed, 17 Nov 2004 13:47:59 -0500

> 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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]