Return to BSD News archive
Xref: sserve comp.unix.bsd:15203 comp.unix.internals:7892 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!EU.net!Germany.EU.net!b.marco.de!krabat!leo From: leo@krabat.marco.de (Matthias Pfaller) Newsgroups: comp.unix.bsd,comp.unix.internals Subject: Re: mmap() returns errno = 5. Any Clues?? Message-ID: <3895@krabat.marco.de> Date: 26 Oct 94 09:34:34 GMT References: <38gb37$4d6@speedy.inri.com> Followup-To: comp.unix.bsd,comp.unix.internals Distribution: world Organization: marco GmbH, D-85221 Dachau Lines: 17 X-Newsreader: TIN [version 1.2 PL2] 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 I had problems with mmap, nfs and SunOS 4.x.x too. It turned out that if you have locked the file in question you can't mmap it for an unknown period of time even if the lock is removed... So in case your mixing mmap and nfs locking you may have the same problem I had (Solution: Don't use mmap). Matthias