POSIX message queue naming

Hi,

I am programming a multi-threaded application using POSIX threads and message queues.
When creating a message queue, I need to provide a name (filename) for the queue.

I want to be able to run several copies of my application (without any connection between them), each not interfering with the other. If I use the same message queue name, a collision should occur between the application copies.
But if I use random naming, i quickly ran out of resources (mqueue limits).
How can I face this problem?

Thanks!
@yes u shuld provide a any file name just to get the key ...
If any two processes wants to communicate with message queues u shuld give the same key for them(u can get the same key by doing ftok with the same file name in both the processes)...
------ rest of ur question i dint get u ...
Topic archived. No new replies allowed.