This is the mail archive of the libc-alpha@sources.redhat.com 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]

Will st_ctime, st_mtime be update in mmap()?


Hi,

POSIX spec (IEEE_1003.1-2001) says:

The st_ctime and st_mtime fields of a file that is mapped with
MAP_SHARED and PROT_WRITE
shall be marked for update at some point in the interval between a write
reference to the
mapped region and the next call to msync( ) with MS_ASYNC or MS_SYNC for
that portion of
the file by any process. If there is no such call and if the underlying
file is modified as a result of
a write reference, then these fields shall be marked for update at some
time after the write
reference.

But a test case in Open Posix Testsuite (mmap/14-1.c) shows that
st_ctime, and st_mtime field of a mapped file
will not be changed by mmap(), write reference to mapped region, and
msync(). 
http://cvs.sourceforge.net/viewcvs.py/posixtest/posixtestsuite/conforman
ce/interfaces/mmap/14-1.c

I tested on latest CVS pull of libc and linux kernel-2.6.5.

I am wondering whether glibc implement this?

Thanks

-adam

------------------------------------------------
Message above is personal view, not my employer's.

 


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