1MQ_CLOSE(P) POSIX Programmer's Manual MQ_CLOSE(P)
2
3
4
6 mq_close - close a message queue (REALTIME)
7
9 #include <mqueue.h>
10
11 int mq_close(mqd_t mqdes);
12
13
15 The mq_close() function shall remove the association between the mes‐
16 sage queue descriptor, mqdes, and its message queue. The results of
17 using this message queue descriptor after successful return from this
18 mq_close(), and until the return of this message queue descriptor from
19 a subsequent mq_open(), are undefined.
20
21 If the process has successfully attached a notification request to the
22 message queue via this mqdes, this attachment shall be removed, and the
23 message queue is available for another process to attach for notifica‐
24 tion.
25
27 Upon successful completion, the mq_close() function shall return a
28 value of zero; otherwise, the function shall return a value of -1 and
29 set errno to indicate the error.
30
32 The mq_close() function shall fail if:
33
34 EBADF The mqdes argument is not a valid message queue descriptor.
35
36
37 The following sections are informative.
38
40 None.
41
43 None.
44
46 None.
47
49 None.
50
52 mq_open() , mq_unlink() , msgctl() , msgget() , msgrcv() , msgsnd() ,
53 the Base Definitions volume of IEEE Std 1003.1-2001, <mqueue.h>
54
56 Portions of this text are reprinted and reproduced in electronic form
57 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
58 -- Portable Operating System Interface (POSIX), The Open Group Base
59 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
60 Electrical and Electronics Engineers, Inc and The Open Group. In the
61 event of any discrepancy between this version and the original IEEE and
62 The Open Group Standard, the original IEEE and The Open Group Standard
63 is the referee document. The original Standard can be obtained online
64 at http://www.opengroup.org/unix/online.html .
65
66
67
68IEEE/The Open Group 2003 MQ_CLOSE(P)