#include
#include
#include
void main()
{
int pid;
int shmid;
char* shmAddr;
int status;
pid = fork();
if( pid != 0 )
{
shmid = shmget(1234 , 1024 , IPC_CREAT|0666);
shmAddr = (char*) shmat(shmid, 0, 0);
strcpy(shmAddr, "sohn");
printf("process1 sent message sohn to sharedMemory\n");
wait(&status);