title: Copy a structure to a shared memory in C using POSIX standard
body: <p>I need to access a structure between different processes.
  Is there any way to copy a structure in to a shared memory and then access the same structure in some other process.(using POSIX standards)</p>
  
  <p>My structure is</p>
  
  <pre><code>typedef struct binary_semaphore {
      pthread_mutex_t mutex;
      sem_t *sem;
  } binary_semaphore;
  </code></pre>