#include <mqueue.h> int mq_close( mqd_t mqdes );
EINVAL
- The descriptor does not represent a valid open message
queue
The mq_close function removes the association between the message queue descriptor, mqdes, and its message queue. If mq_close() is successfully completed, the function returns a value of zero; otherwise, the function returns a value of -1 and sets errno to indicate the error.
If the process had successfully attached a notification request to the message queue via mq_notify, this attachment is removed, and the message queue is available for another process to attach for notification. mq_close has no effect on the contents of the message queue, all the messages that were in the queue remain in the queue.
Copyright © 1988-2004 OAR Corporation