I want to do the following:
Parent process creates a child process. Then the child process reads n int\'s from the user and store them in a shared memory. The parent
My problem was so stupid. I need to provide the Child process with the ability to write into the SHM. This line in the if-block :
shmid = shmget(2009, SHMSIZE, 0);
Will become like this:
shmid = shmget(2009, SHMSIZE, 0666 | IPC_CREAT);
Thanks to you all and especially to @JoachimPileborg :)