title: Struct with shared memory and initialization
body: <p>Following <a href="https://stackoverflow.com/questions/11709929/how-to-initialize-a-pointer-to-a-struct-in-c/11709951#11709950">my previous</a> post , I want to take that one step ahead : </p>
  
  <p>I want to allocate a shared memory region , and put initial values for the allocated/shared 
  data : </p>
  
  <pre><code>static struct PipeShm  myPipeSt = {.init = 0 , .flag = FALSE , .mutex = NULL , .ptr1 = NULL , .ptr2 = NULL ,
          .status1 = -10 , .status2 = -10 , .semaphoreFlag = FALSE };
  
  int shmid  = shmget(IPC_PRIVATE, sizeof(int), 0600);
  static struct PipeShm  * myPipe = shmat(shmid, NULL, 0); // &amp;myPipeSt;
  
  myPipe = &amp; myPipeSt; // that doesn't compile 
  </code></pre>
  
  <p>Suggestions ? </p>
  
  <p>Much appreciated !</p>