text
stringlengths 0
234
|
---|
information about reporting bugs, |
and the latest version of this page, |
can be found at |
\%https://www.kernel.org/doc/man\-pages/. |
.\" copyright (c) 2006 michael kerrisk <[email protected]> |
.\" |
.\" %%%license_start(verbatim) |
.\" permission is granted to make and distribute verbatim copies of this |
.\" manual provided the copyright notice and this permission notice are |
.\" preserved on all copies. |
.\" |
.\" permission is granted to copy and distribute modified versions of this |
.\" manual under the conditions for verbatim copying, provided that the |
.\" entire resulting derived work is distributed under the terms of a |
.\" permission notice identical to this one. |
.\" |
.\" since the linux kernel and libraries are constantly changing, this |
.\" manual page may be incorrect or out-of-date. the author(s) assume no |
.\" responsibility for errors or omissions, or for damages resulting from |
.\" the use of the information contained herein. the author(s) may not |
.\" have taken the same level of care in the production of this manual, |
.\" which is licensed free of charge, as they might when working |
.\" professionally. |
.\" |
.\" formatted or processed versions of this manual, if unaccompanied by |
.\" the source, must acknowledge the copyright and authors of this work. |
.\" %%%license_end |
.\" |
.th mq_close 3 2021-03-22 "linux" "linux programmer's manual" |
.sh name |
mq_close \- close a message queue descriptor |
.sh synopsis |
.nf |
.b #include <mqueue.h> |
.pp |
.bi "int mq_close(mqd_t " mqdes ); |
.fi |
.pp |
link with \fi\-lrt\fp. |
.sh description |
.br mq_close () |
closes the message queue descriptor |
.ir mqdes . |
.pp |
if the calling process has attached a notification request (see |
.rb ( mq_notify (3)) |
to this message queue via |
.ir mqdes , |
then this request is removed, |
and another process can now attach a notification request. |
.sh return value |
on success |
.br mq_close () |
returns 0; on error, \-1 is returned, with |
.i errno |
set to indicate the error. |
.sh errors |
.tp |
.b ebadf |
the message queue descriptor specified in |
.i mqdes |
is invalid. |
.sh attributes |
for an explanation of the terms used in this section, see |
.br attributes (7). |
.ad l |
.nh |
.ts |
allbox; |
lbx lb lb |
l l l. |
interface attribute value |
t{ |
.br mq_close () |
t} thread safety mt-safe |
.te |
.hy |
.ad |
.sp 1 |
.sh conforming to |
posix.1-2001, posix.1-2008. |
.sh notes |
all open message queues are automatically closed on process termination, |
or upon |
.br execve (2). |
.sh see also |
.br mq_getattr (3), |
.br mq_notify (3), |
.br mq_open (3), |
.br mq_receive (3), |
.br mq_send (3), |
.br mq_unlink (3), |
.br mq_overview (7) |
.sh colophon |
this page is part of release 5.13 of the linux |
.i man-pages |
project. |
a description of the project, |
information about reporting bugs, |
Subsets and Splits