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