]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/mq_close.3
man*/: srcfix (Use .P instead of .PP or .LP)
[thirdparty/man-pages.git] / man3 / mq_close.3
CommitLineData
a1eaacb1 1'\" t
c11b1abf 2.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
80a99f39 3.\"
5fbde956 4.\" SPDX-License-Identifier: Linux-man-pages-copyleft
80a99f39 5.\"
4c1c5274 6.TH mq_close 3 (date) "Linux man-pages (unreleased)"
80a99f39
MK
7.SH NAME
8mq_close \- close a message queue descriptor
48b739c5
AC
9.SH LIBRARY
10Real-time library
8fc3b2cf 11.RI ( librt ", " \-lrt )
80a99f39
MK
12.SH SYNOPSIS
13.nf
14.B #include <mqueue.h>
c6d039a3 15.P
c9e83f06 16.BI "int mq_close(mqd_t " mqdes );
80a99f39
MK
17.fi
18.SH DESCRIPTION
19.BR mq_close ()
20closes the message queue descriptor
21.IR mqdes .
c6d039a3 22.P
bcdd78a0 23If the calling process has attached a notification request (see
dcdd5390 24.BR mq_notify (3))
80a99f39
MK
25to this message queue via
26.IR mqdes ,
c13182ef 27then this request is removed,
80a99f39 28and another process can now attach a notification request.
80a99f39
MK
29.SH RETURN VALUE
30On success
31.BR mq_close ()
32returns 0; on error, \-1 is returned, with
c13182ef 33.I errno
80a99f39
MK
34set to indicate the error.
35.SH ERRORS
36.TP
37.B EBADF
1cd9229c 38The message queue descriptor specified in
80a99f39
MK
39.I mqdes
40is invalid.
0e7d2e7f 41.SH ATTRIBUTES
2f75eb08
PH
42For an explanation of the terms used in this section, see
43.BR attributes (7).
44.TS
45allbox;
c466875e 46lbx lb lb
2f75eb08
PH
47l l l.
48Interface Attribute Value
49T{
9e54434e
BR
50.na
51.nh
0e7d2e7f 52.BR mq_close ()
2f75eb08
PH
53T} Thread safety MT-Safe
54.TE
3113c7f3 55.SH STANDARDS
4131356c
AC
56POSIX.1-2008.
57.SH HISTORY
58POSIX.1-2001.
2b2581ee
MK
59.SH NOTES
60All open message queues are automatically closed on process termination,
61or upon
62.BR execve (2).
47297adb 63.SH SEE ALSO
80a99f39
MK
64.BR mq_getattr (3),
65.BR mq_notify (3),
66.BR mq_open (3),
67.BR mq_receive (3),
68.BR mq_send (3),
69.BR mq_unlink (3),
70.BR mq_overview (7)