Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - mq_open() is not creating unique descriptors: (2 Items)
   
mq_open() is not creating unique descriptors  
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  
Hi Adlai,

this is expected. Queue descriptors (like all file descriptors) are local to the process that called open(). The mqueue 
server identifies the client based on the combination of process id and queue descriptor, so there's no problem. 

Regards,
Thomas

-----Original Message-----
From: Adlai Shawareb [mailto:community-noreply@qnx.com] 
Sent: Freitag, 14. Februar 2014 21:01
To: general-bazaar
Subject: mq_open() is not creating unique descriptors

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_)



_______________________________________________

General
http://community.qnx.com/sf/go/post108809
To cancel your subscription to this discussion, please e-mail general-bazaar-unsubscribe@community.qnx.com