mq_close(3R)
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.
SunOS 5.5.1 — Last change: 19 Aug 1993