#8 netshm assumes seekable filedescr via Bigarray memmap

None
pending
nobody
None
5
2014-09-06
2008-07-22
Anonymous
No

I'm trying to use the Netshm module on Macos X 10.4.

Unfortunately, as soon as I try to Netshm.manage the shared memory region, I get a

Fatal error: exception Sys_error("Illegal seek")

This is from the bigarray memmap code which does an lseek to find the end of the file and hence the size. Perhaps the file descriptors are seekable on Linux, but apparently not on OSX and certainly this is not guarenteed by the POSIX shared memory functions AFAIK.

If I can come up with a good patch, I'll send it in; for now, I'm going to have to work around this.

- Reid van Melle
(rvanmelle i'm at gmail dot com)

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I've been working with my own mmap bindings and have some thoughts/ideas/codes if anybody is interested at some point.

     
  • Gerd Stolpmann

    Gerd Stolpmann - 2014-09-06

    This is a known deficiency.

    The seeks are only needed for the record locking. A fix could be to open a second real file (which can be empty), and use the second file for locking purposes. I need to think about this, maybe we have to make this visible in the API.

     
  • Gerd Stolpmann

    Gerd Stolpmann - 2014-09-06
    • status: open --> pending
    • Group: -->
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks