title: Behaviour of shm_unlink
body: <p>I have the following code snippet :</p>
  <pre class="lang-c prettyprint-override"><code>fd_mem = shm_open(MEM_NAME , O_RDWR | O_CREAT | O_EXCL , 0600);
  
  //Why do we use unlink before having mmaped ? 
  shm_unlink ( MEM_NAME );
  
  ftruncate (fd_mem , mem_size)
      
  plateau = (char*) mmap(NULL , mem_size , PROT_READ | PROT_WRITE , MAP_SHARED , fd_mem , 0);
  </code></pre>
  <p>My question is: why do we use &quot;unlink&quot; before having mapped the file into the virtual memory of the process? I'm confused as to how <code>shm_unlink()</code> works in that regard. I would think it deletes the file making <em>fd_mem</em> unusable but it doesn't.</p>