]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/sys/mq_close.2
Remove $FreeBSD$: two-line nroff pattern
[FreeBSD/FreeBSD.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 .Dd November 29, 2005
39 .Dt MQ_CLOSE 2
40 .Os
41 .Sh NAME
42 .Nm mq_close
43 .Nd "close a message queue (REALTIME)"
44 .Sh LIBRARY
45 .Lb librt
46 .Sh SYNOPSIS
47 .In mqueue.h
48 .Ft int
49 .Fn mq_close "mqd_t mqdes"
50 .Sh DESCRIPTION
51 The
52 .Fn mq_close
53 system call removes the association between the message queue descriptor,
54 .Fa mqdes ,
55 and its message queue.
56 The results of using this message queue descriptor
57 after successful return from this
58 .Fn mq_close ,
59 and until the return of this message queue descriptor from a subsequent
60 .Fn mq_open ,
61 are undefined.
62 .Pp
63 If the process has successfully attached a notification request to the
64 message queue via this
65 .Fa mqdes ,
66 this attachment will be removed, and the message queue is available for
67 another process to attach for notification.
68 .Sh RETURN VALUES
69 .Rv -std
70 .Sh ERRORS
71 The
72 .Fn mq_close
73 system call
74 will fail if:
75 .Bl -tag -width Er
76 .It Bq Er EBADF
77 The
78 .Fa mqdes
79 argument is not a valid message queue descriptor.
80 .El
81 .Sh SEE ALSO
82 .Xr mq_open 2 ,
83 .Xr mq_unlink 2
84 .Sh STANDARDS
85 The
86 .Fn mq_close
87 system call conforms to
88 .St -p1003.1-2004 .
89 .Sh HISTORY
90 Support for
91 .Tn POSIX
92 message queues first appeared in
93 .Fx 7.0 .
94 .Sh COPYRIGHT
95 Portions of this text are reprinted and reproduced in electronic form
96 from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology --
97 Portable Operating System Interface (POSIX), The Open Group Base
98 Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
99 Electrical and Electronics Engineers, Inc and The Open Group.  In the
100 event of any discrepancy between this version and the original IEEE and
101 The Open Group Standard, the original IEEE and The Open Group Standard is
102 the referee document.  The original Standard can be obtained online at
103 http://www.opengroup.org/unix/online.html.