]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3p/mq_close.3p
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3p / mq_close.3p
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"
3 .\" mq_close
4 .SH NAME
5 mq_close \- close a message queue (\fBREALTIME\fP)
6 .SH SYNOPSIS
7 .LP
8 \fB#include <mqueue.h>
9 .br
10 .sp
11 int mq_close(mqd_t\fP \fImqdes\fP\fB); \fP
12 \fB
13 .br
14 \fP
15 .SH DESCRIPTION
16 .LP
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(),
22 are undefined.
23 .LP
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.
28 .SH RETURN VALUE
29 .LP
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.
33 .SH ERRORS
34 .LP
35 The \fImq_close\fP() function shall fail if:
36 .TP 7
37 .B EBADF
38 The \fImqdes\fP argument is not a valid message queue descriptor.
39 .sp
40 .LP
41 \fIThe following sections are informative.\fP
42 .SH EXAMPLES
43 .LP
44 None.
45 .SH APPLICATION USAGE
46 .LP
47 None.
48 .SH RATIONALE
49 .LP
50 None.
51 .SH FUTURE DIRECTIONS
52 .LP
53 None.
54 .SH SEE ALSO
55 .LP
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
59 .SH COPYRIGHT
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 .