Date: Wed, 17 Nov 2004 14:07:11 -0500 From: Mikhail Teterin <Mikhail.Teterin@murex.com> To: freebsd-current@freebsd.org Subject: open(), mmap(), sendfile() vs. the file's access time Message-ID: <200411171407.11793.Mikhail.Teterin@murex.com>
next in thread | raw e-mail | index | archive | help
--Boundary-00=_fF6mByMcCkZoh78 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! It appears, only read() modifies a file's atime. Otherwise, a file can be open()-ed and subsequently _accessed_ through mmap or sendfile()-ed away without atime being changed. Does not seem right... Should open() update atime? My first reaction would be yes, but on Linux and Solaris the behaviour is the same (try attached program). Should sendfile()? What about mmap() -- there are some hairy usages?.. All I'm trying to do is track the last time a file was downloaded from the web-server. But Apache uses sendfile() (zero copy and what not) and thus no luck :-( Thanks! Yours, -mi --Boundary-00=_fF6mByMcCkZoh78--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411171407.11793.Mikhail.Teterin>