#include
#include
#include
int main()
{
int pid;
int shmid;
char *shmaddr;
int status;
pid = fork();
if( pid != 0 )
{
shmid = shmget((key_t)5634, 1234, IPC_CREAT|0666); //get ID
shmaddr = (char*)shmat(shmid, 0, 0);
printf("process1: %d \n",pid);
strcpy(shmaddr, "sohn");