I am using msgget() syscall to get new msg queue. I have used the IPC_CREAT & IPC_EXCL flags in that. like
message_queue = msgget(ftok("/tmp", 100), (0666 | IPC_CREAT | IPC_EXCL));
Now, when my prog exists unexpectedly, the msg queue remains and I am failed to re-create the msg queue. So, my question is “How can I get back the existing msg queues’s ID ?”
and by the way, where does msg queue stores its id ?
Regd “How can I get back the existing msg queues’s ID ?”
From man msgget
Try without IPC_EXCL flag.
Regd. where does msg queue stores its id
from man proc