I have a situation where multiple processes need to access a memory mapped file.
However, between the time the first process maps the file and the time a subsequent process in the group maps the file, the file may have been removed from the filesystem. (I.e. has no "path") Coordinating the cache pruner (which would remove the file) to not affect the overall "atomicity" of the process group would be a real chore. Therefore I need to communicate and use the file descriptor rather than the path name when subsequent processes map the file. (Using SCM_RIGHTS on a unix socket, /proc/.../fd ... as a couple of ways that come to mind.... cannot inherit the fd since the parent proc is often the late joiner.) Would we just make a variant of Open() that takes a fd rather than a path? Related to this, need to be able to discover the fd of a mapped file and need these APIs in Python as well. Would this API have any analogy on Windows? Do we have platform-specific functionality? Thoughts? -John