POSIX provides a way to read a message queue using its mq_receive function. This function also removes it from the queue. I need to find a way to check to see if a message is in the queue without removing it.
views:
27answers:
1
A:
From the Linux mq_overview(7) man page:
Polling message queue descriptors
On Linux, a message queue descriptor is actually a file descriptor, and can be monitored using select(2), poll(2), or epoll(7). This is not portable.
ninjalj
2010-06-22 20:29:04
Thanks.Right I have "faked" it in order to get it to work by immediatedly doing a mq_send with a high priority message after using a mq_recieve in a check msg queue fashion.
2010-06-22 20:46:10