I have created 4 shared memory segments using
shmid=shmget(key+sdz, shmSize, 0664);
and
shmat(shmid, CurAddr,SHM_RND);
CurAddr is updated by changing the offset for shmSize for different segments.
the segments are successfully created, checked through ipcs,the client also successfully attach to shared mem segment but the data read is (null) and the client terminated
giving segmentation fault.((null) is compared wid string)