How can clashes in msgget() or mq_open() be prevented?

21 views Asked by At

As two calls (possibly in different processes) to either msgget() or mq_open() providing the same key argument give the caller access to the same message queue (which is usually intended), how can clashes be prevented?

I.e., as an application developer, how can I come up with a convention to generate keys for my message queue(s) that no other program on the system uses so as to avert unwanted interference?

0

There are 0 answers