View topic - mq_open() is not creating unique descriptors

Page 1 of 1

mq_open() is not creating unique descriptors

PostPosted: Fri Feb 14, 2014 7:56 pm
by qnxforme23
All,

I'm calling mq_open() from separate processes on the same machine. I am givning unique queue names for each queue. However, mq_open() is returning the same queue descriptor number each time mq_open() is called. Any ideas?

Here is the call:
struct mq_attr mq_attributes_;
mq_attributes_.mq_maxmsg = 100;
mq_attributes_.mq_msgsize = 8196;
mq_open( queue_name_, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWGRP, &mq_attributes_)

Re: mq_open() is not creating unique descriptors

PostPosted: Sat Feb 15, 2014 7:03 am
by maschoen
The descriptor is only unique to the process, so duplicates are not unexpected.