HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
m
mq_close(2) mq_close(2)
NAME
mq_close - close a message queue descriptor
SYNOPSIS
#include <sys/mqueue.h>
int mq_close(mqd_t mqdes);
DESCRIPTION
The mq_close() system call removes the association between the message queue descriptor, mqdes, and
a message queue. Use of this message queue descriptor by the process, after a successful return from this
mq_close(), and until this descriptor is returned by a subsequent mq_open(), will result in the failure
of message queue system calls, with errno set to EBADF.
If the process has a registered notification request with the message queue associated with this mqdes, the
registration is canceled and the queue becomes available for another process to register a notification
request.
If the message queue has been unlinked and mqdes is the only existing open descriptor for the queue, the
queue is destroyed.
RETURN VALUE
mq_close() returns the following values:
0 Successful completion.
-1 Failure. errno is set to indicate the error.
ERRORS
If mq_close() fails, errno is set to one of the following values:
[EBADF] mqdes is not a valid message queue descriptor.
[ENOSYS] mq_close() is not supported by the implementation.
SEE ALSO
mq_open(2), mq_unlink(2), mq_notify(2).
STANDARDS CONFORMANCE
mq_close(): POSIX 1003.1b
Section 2−−172 − 1 − HP-UX Release 11i: December 2000
___
___