shared memory access hinzugefügt
This commit is contained in:
parent
9faf65438a
commit
255b05cd19
|
@ -42,7 +42,7 @@ int semaphoreOperation (int op) {
|
|||
}
|
||||
|
||||
void writeToShm(char* text, int size) {
|
||||
int shmId = shmget(memoryAccessKey, NULL, 0);
|
||||
int shmId = shmget(memoryAccessKey, NULL, 0); // dont init just get the ID if already existing.
|
||||
if(shmId < 0 ) {
|
||||
exit(EXIT_FAILURE);
|
||||
/* we could return -1, not sure if it will be useful to continue after there is no shm allocated for any reason*/
|
||||
|
|
Loading…
Reference in New Issue