title: Shared memory for fork
body: <p>I want to create a shared memory between two process. I used fork(). A child tries to change this shared memory and mother creates another child so new child tries to change same memory so on. here is my code in C programing. (ubuntu)</p>
  
  <pre><code>mylist ch=NUL; 
  f=fork();
  if(!f){
          pba=shmget(KEYSHM,sizeof(char),0); /*created shared memory*/
          ch=(mylist *) shmat(pba,0,0);
          ch-&gt;name=ugur;
          ch-&gt;surname=cedric;
  ...do something...
  }
  else{
          if(ch)
          printf("this is top of mylist %s"ch-&gt;name);
  .......do something
  }
  </code></pre>
  
  <p>It never writes ch->name. why? I created a shared memory. Why parent process cannot read?</p>