Justin, > > To your patch: > > > > > fopen, fdopen, freopen \- stream open functions > > > > Did you check whether you text is true of all three of these > > functions? > Yup, I just checked. > > > > +.TP > > > +.B m > > > +Attempts to access the file using \fBmmap()\fP rather than > > > +\fBread()\fP and \fBwrite()\fP. > > > > How did you deduce "write()"? My reading is that mmap() is only used > > if the file is opened for reading. > This seems to be true, as indicated in the comments. I hadn't > followed the code well enough to be sure, though, and it is slightly > strange that it defers the mmap decision until the first read.. > > 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()? 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]