On Wed, Oct 17, 2012 at 03:14:14PM +0100, Jason McIntyre wrote:

> On Wed, Oct 17, 2012 at 09:06:23AM +0200, Otto Moerbeek wrote:
> > 
> > Op 16 okt. 2012 om 22:56 heeft Jason McIntyre <j...@kerhand.co.uk> het 
> > volgende geschreven:
> > 
> > > On Sat, Oct 06, 2012 at 09:40:23PM +0200, Dawe wrote:
> > >> I think this information is already given in the sentences before.
> > >> 
> > >> Index: mmap.2
> > >> ===================================================================
> > >> RCS file: /cvs/src/lib/libc/sys/mmap.2,v
> > >> retrieving revision 1.39
> > >> diff -u -p -u -p -r1.39 mmap.2
> > >> --- mmap.2    12 Apr 2012 12:53:27 -0000    1.39
> > >> +++ mmap.2    6 Oct 2012 19:35:32 -0000
> > >> @@ -188,10 +188,6 @@ The symbol
> > >> .Dv MAP_FAILED
> > >> is defined in the header
> > >> .Ao Pa sys/mman.h Ac .
> > >> -No successful return from
> > >> -.Fn mmap
> > >> -will return the value
> > >> -.Dv MAP_FAILED .
> > >> .Sh ERRORS
> > >> .Fn mmap
> > >> will fail if:
> > >> 
> > > 
> > > philip guenther replied to this:
> > > 
> > >        No, it isn't.  The previous sentences say that MAP_FAILED
> > >        is returned on error; this one says that MAP_FAILED is
> > >        *only* returned on error.  Contrast this to strtoul(), where
> > >        ULONG_MAX is returned on error, but can also be returned
> > >        on success, meaning you have to do extra steps (clear errno
> > >        before, test it afterwards) to detect failure.  This sentence
> > >        is the one that makes it clear that that isn't the case
> > >        with mmap().
> > > 
> > > i have to say, i didn;t get that. after discussing it a bit i've come to
> > > see there is an ambiguity in the sentence being proposed for removal - it
> > > can be read two ways.
> > 
> > Wondering which two ways. I can only see one. It must be either lack of 
> > coffee or too much exposure to formal logic.
> > 
> > That said, I like your diff.
> > 
> >  -Otto
> > 
> 
> well, i spent a few days arguing with guenther before i saw it. so i'd
> say it's subtle ;) the sentence in question is this:
> 
>       No successful return from mmap will return the value MAP_FAILED.
> 
> what it's trying to say is that "under no cicumstances will a successful
> mmap return MAP_FAILED". however i (and the original poster, i presume)
> read it as "an unsuccessful return from mmap will return MAP_FAILED".
> 
> since the latter had already been said, we supposed it to be
> duplication. i'd have zapped it if guenther hadn;t spotted the true
> intent.
> 
> jmc

aha, now that is cleared up I'm even more in favor of your diff.

        -Otto

Reply via email to