I have seen that question on SO already but it wasn't clear to me the following case:
A shm has been created. So if I call in my case:
int shmid = shmget(key, sizeof(struct messageQueue), IPC_CREAT | S_IRWXU | IPC_EXCL);
shmid turns -1 if the shm already exists. But can i somewhere get it's ID? Or do I need to call shmget(...) without EXCL flag again in order to get the ID?
Thanks in advance