title: Is it safe to perform file-based (fd-based) access on a POSIX shared memory object?
body: <p><code>shm_open</code> returns an <code>fd</code> associated with a "shared memory object". And normally, this object is then mapped into virtual memory (with <code>mmap</code>) to access as a <code>memory-mapped file</code>.</p>
  
  <p><strong>However</strong>, is it safe to access the shared memory object <strong>through its <code>fd</code></strong> (as if it were a normal file)? And by "safe", I mean guaranteed by POSIX to have well-defined behavior?</p>
  
  <p>The reason I'm asking is that I'm working with a third-party interface that will <strong>only</strong> accept an <code>fd</code> (instead of a memory address) for writing a fixed number of bytes.</p>