1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "MQ_CLOSE" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
5 mq_close \- close a message queue (\fBREALTIME\fP)
11 int mq_close(mqd_t\fP \fImqdes\fP\fB); \fP
17 The \fImq_close\fP() function shall remove the association between
18 the message queue descriptor, \fImqdes\fP, and its message
19 queue. The results of using this message queue descriptor after successful
20 return from this \fImq_close\fP(), and until the return
21 of this message queue descriptor from a subsequent \fImq_open\fP(),
24 If the process has successfully attached a notification request to
25 the message queue via this \fImqdes\fP, this attachment
26 shall be removed, and the message queue is available for another process
27 to attach for notification.
30 Upon successful completion, the \fImq_close\fP() function shall return
31 a value of zero; otherwise, the function shall return a
32 value of -1 and set \fIerrno\fP to indicate the error.
35 The \fImq_close\fP() function shall fail if:
38 The \fImqdes\fP argument is not a valid message queue descriptor.
41 \fIThe following sections are informative.\fP
56 \fImq_open\fP() , \fImq_unlink\fP() , \fImsgctl\fP() , \fImsgget\fP()
57 , \fImsgrcv\fP() , \fImsgsnd\fP() , the Base Definitions volume of
58 IEEE\ Std\ 1003.1-2001, \fI<mqueue.h>\fP
60 Portions of this text are reprinted and reproduced in electronic form
61 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
62 -- Portable Operating System Interface (POSIX), The Open Group Base
63 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
64 Electrical and Electronics Engineers, Inc and The Open Group. In the
65 event of any discrepancy between this version and the original IEEE and
66 The Open Group Standard, the original IEEE and The Open Group Standard
67 is the referee document. The original Standard can be obtained online at
68 http://www.opengroup.org/unix/online.html .