[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    mq_close(3R) manual page Table of Contents

Name

mq_close - close a message queue

Synopsis

cc [ flag ... ] file ... -lposix4 [ library ... ]

#include <mqueue.h>

int mq_close(mqd_t mqdes);

MT-Level

MT-Safe

Description

mq_close() removes the association between the message queue descriptor, mqdes, and its message queue.

If the process (or thread) has registered a notification request to the message queue via this mqdes, this registration is removed and the message queue is available for another process to attach for notification.

Return Values

Upon successful completion, mq_close() returns 0; otherwise, the function returns -1 and sets errno to indicate the error condition.

Errors

EBADF
mqdes is an invalid message queue descriptor.
ENOSYS
sem_open() is not supported by this implementation.

See Also

mq_notify(3R) , mq_open(3R) , mq_unlink(3R)

Bugs

In Solaris 2.5, these functions always return -1 and set errno to ENOSYS, because this release does not support the Message Passing option. It is our intention to provide support for these interfaces in future releases.


Table of Contents