Return to BSD News archive
Xref: sserve comp.unix.bsd:15221 comp.unix.internals:7907 Newsgroups: comp.unix.bsd,comp.unix.internals Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!convex!hermes.oc.com!news.unt.edu!cs.utexas.edu!howland.reston.ans.net!pipex!uk.mdis.com!ar From: ar@zeus.uk.mdis.com (Alastair Rae) Subject: Re: mmap() returns errno = 5. Any Clues?? Reply-To: arae@mdis.com Organization: MDIS (McDonnell Information Systems) UK Date: Thu, 27 Oct 1994 12:46:10 GMT Message-ID: <CyC0t0.M8z@mdis.com> Followup-To: comp.unix.bsd,comp.unix.internals X-Newsreader: TIN [version 1.2 PL0] References: <38gb37$4d6@speedy.inri.com> Sender: news@mdis.com (News System Admin) Lines: 25 Anthony D Alston (ada@grumpy.mnfep.nn.inri.com) wrote: > The following line fails when trying to memory map a file thats > on a NFS mount directory. mmap() returns 0xffffff and errno = 5. > This line works fine when the file is on a local file system. > addr = mmap(0, map_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0l); > I'm running SunOS 4.1.1 Hum. Do you really expect to be able to do bit-mapped i/o on a shared remote file? I don't think NFS is that clever. Purely conjecture but I'd guess you *might* be able to do MAP_PRIVATE stuff and then sync with memcntl(MC_SYNC). I'm surprised you got EIO. mmap(2) doesn't mention this in the list of errors. I'd expect maybe ENODEV or EINVAL. -- Alastair Rae : arae@mdis.com The opinions expressed here are probably not those of my employers