]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/sys/mq_close.2
This commit was generated by cvs2svn to compensate for changes in r176187,
[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 .\" $FreeBSD$
29 .\"
30 .Dd November 29, 2005
31 .Dt MQ_CLOSE 2
32 .Os
33 .Sh NAME
34 .Nm mq_close
35 .Nd "close a message queue (REALTIME)"
36 .Sh LIBRARY
37 .Lb librt
38 .Sh SYNOPSIS
39 .In mqueue.h
40 .Ft int
41 .Fn mq_close "mqd_t mqdes"
42 .Sh DESCRIPTION
43 The
44 .Fn mq_close
45 system call removes the association between the message queue descriptor,
46 .Fa mqdes ,
47 and its message queue.
48 The results of using this message queue descriptor
49 after successful return from this
50 .Fn mq_close ,
51 and until the return of this message queue descriptor from a subsequent
52 .Fn mq_open ,
53 are undefined.
54 .Pp
55 If the process has successfully attached a notification request to the
56 message queue via this
57 .Fa mqdes ,
58 this attachment will be removed, and the message queue is available for
59 another process to attach for notification.
60 .Sh RETURN VALUES
61 .Rv -std
62 .Sh ERRORS
63 The
64 .Fn mq_close
65 system call
66 will fail if:
67 .Bl -tag -width Er
68 .It Bq Er EBADF
69 The
70 .Fa mqdes
71 argument is not a valid message queue descriptor.
72 .El
73 .Sh SEE ALSO
74 .Xr mq_open 2 ,
75 .Xr mq_unlink 2
76 .Sh STANDARDS
77 The
78 .Fn mq_close
79 system call conforms to
80 .St -p1003.1-2004 .
81 .Sh HISTORY
82 Support for
83 .Tn POSIX
84 message queues first appeared in
85 .Fx 7.0 .