shared memory access hinzugefügt

This commit is contained in:
Cigerxwin Chaker 2019-11-06 11:38:46 +01:00
parent 9faf65438a
commit 255b05cd19

View File

@ -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*/