Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 1999 01:03:07 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        "Daniel C. Sobral" <dcs@newsguy.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: mmap 
Message-ID:  <19990319150307.18789.qmail@alpha.comkey.com.au>
In-Reply-To: <36F2241F.623F9C81@newsguy.com>  of Fri, 19 Mar 1999 19:17:03 %2B0900
References:  <199903181913.EAA17529@daniel.sobral> <19990318204354.15163.qmail@alpha.comkey.com.au> <36F2241F.623F9C81@newsguy.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > > What's the meaning of fd = -1 with mmap()?
> > 
> > It's fully covered in the man page.  What don't you understand?
> 
> It isn't "fully" covered in the man page. It says that -1 must be
> used in the case of MAP_ANON. It *doesn't* say what happens when you
> *do not* use MAP_ANON with fd -1, and it *does not* list an error
> code for this case (thus, I suppose one is not returned).

There are too many negatives in there for me to parse it at this
time of night.  However, the man page is clear that mmap returns
an error value (MAP_FAILED) and sets errno (to EINVAL) if you
specify MAP_ANON when fd is not -1 *or* if you don't specify
MAP_ANON and fd did not reference a regular or character special
file (which implies that fd is not -1).

If you're asking something beyond that, you'll have to re-cast
it in terms that I can understand or wait for somebody else who
understands your original question and can offer help.

-- 
Greg Black <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990319150307.18789.qmail>