> > > I just wrote a test case for "r+m", which seems to indicate that you > > > are correct; an "r+m" file is read() not mmaped. > > > > Have you written a test program that verifies (presumably via > > monitoring via 'strace') how 'm' changes the behaviour of stdio > > with respect to the use of mmap()? > Erm, yes, thats what I'm talking about (and is strace exactly what I > did). But I'm not sure if I understand you .. I verified that all 3 > routines mmap() a file if "m" is given (and it is read-only), and do > not mmap() it if "m" is not given (or if it is not read-only). > > I include now the test program :)
Yes, but did you verify: -- which file is being mmap()ed? (There might be many other unrelated mmap() calls going on.) -- whether the behaviour changes if 'm' is removed from the fopen()? (the strace output shd be different). Cheers, Michael -- Michael Kerrisk maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 Want to help with man page maintenance? Grab the latest tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/, read the HOWTOHELP file and grep the source files for 'FIXME'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

