Re: problem with mmap

2008-04-25 Thread hdante
On Apr 25, 4:43 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Apr 25, 9:37 am, Neal Becker <[EMAIL PROTECTED]> wrote: > > > On linux, I don't understand why: > > > f = open ('/dev/eos', 'rw') > > m = mmap.mmap(f.fileno(), 100, prot=mmap.PROT_READ|mmap.PROT_WRITE, > > flags=mmap.MAP_SHARED) > >

Re: problem with mmap

2008-04-25 Thread Carl Banks
On Apr 25, 9:37 am, Neal Becker <[EMAIL PROTECTED]> wrote: > On linux, I don't understand why: > > f = open ('/dev/eos', 'rw') > m = mmap.mmap(f.fileno(), 100, prot=mmap.PROT_READ|mmap.PROT_WRITE, > flags=mmap.MAP_SHARED) > > gives 'permission denied', Try f = open('/dev/eos', 'r+') Carl Ba

problem with mmap

2008-04-25 Thread Neal Becker
On linux, I don't understand why: f = open ('/dev/eos', 'rw') m = mmap.mmap(f.fileno(), 100, prot=mmap.PROT_READ|mmap.PROT_WRITE, flags=mmap.MAP_SHARED) gives 'permission denied', but this c++ code works: #include #include #include #include #include int main() { int fd = open ("/dev/