]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libc/sys/mq_close.2
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libc / sys / mq_close.2
1 .\" Copyright (c) 2005 David Xu <davidxu@FreeBSD.org>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice(s), this list of conditions and the following disclaimer as
9 .\"    the first lines of this file unmodified other than the possible
10 .\"    addition of one or more copyright notices.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice(s), this list of conditions and the following disclaimer in
13 .\"    the documentation and/or other materials provided with the
14 .\"    distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
17 .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
20 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .\" Portions of this text are reprinted and reproduced in electronic form
29 .\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology --
30 .\" Portable Operating System Interface (POSIX), The Open Group Base
31 .\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
32 .\" Electrical and Electronics Engineers, Inc and The Open Group.  In the
33 .\" event of any discrepancy between this version and the original IEEE and
34 .\" The Open Group Standard, the original IEEE and The Open Group Standard is
35 .\" the referee document.  The original Standard can be obtained online at
36 .\"     http://www.opengroup.org/unix/online.html.
37 .\"
38 .\" $FreeBSD$
39 .\"
40 .Dd November 29, 2005
41 .Dt MQ_CLOSE 2
42 .Os
43 .Sh NAME
44 .Nm mq_close
45 .Nd "close a message queue (REALTIME)"
46 .Sh LIBRARY
47 .Lb librt
48 .Sh SYNOPSIS
49 .In mqueue.h
50 .Ft int
51 .Fn mq_close "mqd_t mqdes"
52 .Sh DESCRIPTION
53 The
54 .Fn mq_close
55 system call removes the association between the message queue descriptor,
56 .Fa mqdes ,
57 and its message queue.
58 The results of using this message queue descriptor
59 after successful return from this
60 .Fn mq_close ,
61 and until the return of this message queue descriptor from a subsequent
62 .Fn mq_open ,
63 are undefined.
64 .Pp
65 If the process has successfully attached a notification request to the
66 message queue via this
67 .Fa mqdes ,
68 this attachment will be removed, and the message queue is available for
69 another process to attach for notification.
70 .Sh RETURN VALUES
71 .Rv -std
72 .Sh ERRORS
73 The
74 .Fn mq_close
75 system call
76 will fail if:
77 .Bl -tag -width Er
78 .It Bq Er EBADF
79 The
80 .Fa mqdes
81 argument is not a valid message queue descriptor.
82 .El
83 .Sh SEE ALSO
84 .Xr mq_open 2 ,
85 .Xr mq_unlink 2
86 .Sh STANDARDS
87 The
88 .Fn mq_close
89 system call conforms to
90 .St -p1003.1-2004 .
91 .Sh HISTORY
92 Support for
93 .Tn POSIX
94 message queues first appeared in
95 .Fx 7.0 .
96 .Sh COPYRIGHT
97 Portions of this text are reprinted and reproduced in electronic form
98 from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology --
99 Portable Operating System Interface (POSIX), The Open Group Base
100 Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
101 Electrical and Electronics Engineers, Inc and The Open Group.  In the
102 event of any discrepancy between this version and the original IEEE and
103 The Open Group Standard, the original IEEE and The Open Group Standard is
104 the referee document.  The original Standard can be obtained online at
105 http://www.opengroup.org/unix/online.html.