Re: fsync
- From: Mike <michael.h.williamson@xxxxxxxxx>
- Date: Thu, 27 Dec 2007 16:08:22 -0800 (PST)
On Dec 27, 5:19 pm, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:
Mike <michael.h.william...@xxxxxxxxx> writes:
[...]
Also, I have not concerned myself with how mmap() works, so this is
a surprise to me. I think it might be helpful to others if the man
page for fsync() mentioned msync() in the description, and that
fsync() does not work for mmap()'ed file access.
What do you think?
The mmap(2) manpage documents the need for using msync in certain
cases:
MAP_SHARED Share this mapping with all other processes that
map this object. Storing to the region is equivalent to
writing to the file. The file may not actually be updated
until msync(2) or munmap(2) are called.
I think it is reasonable to expect people to read the mmap manpage
before using this system call.
This mode, MAP_SHARED, is indeed the mode my program uses.
And I probably overlooked the mention of msync() when I read
the man page for mmap().
But, I ask, if "Storing to the region is _equivalent_ to writing to
the file", then should I not expect fsync() on that file
descriptor to work?
-Mike
.
- References:
- Prev by Date: Re: fsync
- Next by Date: confusion with include files
- Previous by thread: Re: fsync
- Next by thread: Re: fsync
- Index(es):
Relevant Pages
|
|