On Wed, May 03, 2006 at 11:04:23PM +0200, Michael Kerrisk wrote: > Justin, > > > Included is a patch to document the fopen mode 'm'; please consider > > applying it. > > To repeat a past request: please, for my sake, make patches > inline rather than attached. Ups, sorry, it occurred to me after the fact.
> > Note that there's also a 'c' flag for open_not_cancel, but since I > > can't find much documentation and don't really understand it, I'm not > > writing a patch at this time .. > > I think I may add something on this. > > 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. Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]