I am having an issue with mq_open in C where it tries to create a queue but i’m getting the following error ENOMEM. I feel that i may have tried to create to many queues without unlinking them and now i have exceeded the number of allowed. Is there way display and remove theses queues? This seems to persist even after the application has been closed with all subsequent attempts at create also failing.
sprintf(idTmp->name, "/%08x%d", (uint32_t) idTmp, rand());
if ((idTmp->mq = mq_open(idTmp->name, O_CREAT, 0x666, NULL)) == -1)
You ask:
That’s not easy. The usual suspects (
ipcs,ipcrm) are designed for System V IPC (msgget(...)), not POSIX IPC (mq_open(...)).Check your
mq_overview(7)manpage — your version of Linux might create message queues on a virtual filesystem, which could be inspected with typical administrative tools. That filesystem, per the manpage, is exposed like so: