1MQ_CLOSE(3) Linux Programmer's Manual MQ_CLOSE(3)
2
3
4
6 mq_close - close a message queue descriptor
7
9 #include <mqueue.h>
10
11 int mq_close(mqd_t mqdes);
12
13 Link with -lrt.
14
16 mq_close() closes the message queue descriptor mqdes.
17
18 If the calling process has attached a notification request to this mes‐
19 sage queue via mqdes, then this request is removed, and another process
20 can now attach a notification request.
21
23 On success mq_close() returns 0; on error, -1 is returned, with errno
24 set to indicate the error.
25
27 EBADF The descriptor specified in mqdes is invalid.
28
30 POSIX.1-2001.
31
33 All open message queues are automatically closed on process termina‐
34 tion, or upon execve(2).
35
37 mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_send(3),
38 mq_unlink(3), mq_overview(7)
39
41 This page is part of release 3.53 of the Linux man-pages project. A
42 description of the project, and information about reporting bugs, can
43 be found at http://www.kernel.org/doc/man-pages/.
44
45
46
47Linux 2010-08-29 MQ_CLOSE(3)