zhz_zhang <firstname.lastname@example.org> wrote:
“David Gibbs” <> email@example.com> > wrote in message
news:al2o79$l2c$> firstname.lastname@example.org> …
zhz_zhang <> email@example.com> > wrote:
In using message queue,
When one process read (BLOCK) from the queue.and another process set
queue attr as NON_BLOCK.
- whether the read queue process will
be changed to read the queue with NON_BLOCK?
- And whether the message queue attr to each process which connect
is same or not?
You didn’t specify whether you were asking about QNX4 or QNX6. But, I
in either case, if you set it with mq_setattr() it is global for the
My system is Qnx6.1.0
I think you can also do this on a per mqd basis, rather than globally
for the queue, but setting the O_NONBLOCK flag in the mq_open() call,
but I haven’t tested to make sure.
I also haven’t tested to see if the server will unblock a blocked
recv/send if the queue attribute is flipped from blocking to
It seems that the attr of queue is local not global.Because one process
the queue a new attr.When another process read attr of queue ,the attr
Under QNX4 the queue attribute change by one process was visible to
another process. As you say, under QNX6 it is not.
I’m not sure what the correct behaviour is – I took a look at the
docs, and at the Posix spec for the calls, I may have to do some more
reading, or discussion. My initial feeling was that the O_NONBLOCK
in the mq_open() would be local, but that the attribute structure would
be associated with the queue, rather than with the local fd, but I’m not
sure if the Posix docs support that interpretation.
QNX Training Services
Please followup in this newsgroup if you have further questions.