]>
Commit | Line | Data |
---|---|---|
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 |
8 | mq_close \- close a message queue descriptor | |
48b739c5 AC |
9 | .SH LIBRARY |
10 | Real-time library | |
8fc3b2cf | 11 | .RI ( librt ", " \-lrt ) |
80a99f39 MK |
12 | .SH SYNOPSIS |
13 | .nf | |
14 | .B #include <mqueue.h> | |
68e4db0a | 15 | .PP |
c9e83f06 | 16 | .BI "int mq_close(mqd_t " mqdes ); |
80a99f39 MK |
17 | .fi |
18 | .SH DESCRIPTION | |
19 | .BR mq_close () | |
20 | closes the message queue descriptor | |
21 | .IR mqdes . | |
847e0d88 | 22 | .PP |
bcdd78a0 | 23 | If the calling process has attached a notification request (see |
dcdd5390 | 24 | .BR mq_notify (3)) |
80a99f39 MK |
25 | to this message queue via |
26 | .IR mqdes , | |
c13182ef | 27 | then this request is removed, |
80a99f39 | 28 | and another process can now attach a notification request. |
80a99f39 MK |
29 | .SH RETURN VALUE |
30 | On success | |
31 | .BR mq_close () | |
32 | returns 0; on error, \-1 is returned, with | |
c13182ef | 33 | .I errno |
80a99f39 MK |
34 | set to indicate the error. |
35 | .SH ERRORS | |
36 | .TP | |
37 | .B EBADF | |
1cd9229c | 38 | The message queue descriptor specified in |
80a99f39 MK |
39 | .I mqdes |
40 | is invalid. | |
0e7d2e7f | 41 | .SH ATTRIBUTES |
2f75eb08 PH |
42 | For an explanation of the terms used in this section, see |
43 | .BR attributes (7). | |
44 | .TS | |
45 | allbox; | |
c466875e | 46 | lbx lb lb |
2f75eb08 PH |
47 | l l l. |
48 | Interface Attribute Value | |
49 | T{ | |
9e54434e BR |
50 | .na |
51 | .nh | |
0e7d2e7f | 52 | .BR mq_close () |
2f75eb08 PH |
53 | T} Thread safety MT-Safe |
54 | .TE | |
c466875e | 55 | .sp 1 |
3113c7f3 | 56 | .SH STANDARDS |
4131356c AC |
57 | POSIX.1-2008. |
58 | .SH HISTORY | |
59 | POSIX.1-2001. | |
2b2581ee MK |
60 | .SH NOTES |
61 | All open message queues are automatically closed on process termination, | |
62 | or upon | |
63 | .BR execve (2). | |
47297adb | 64 | .SH SEE ALSO |
80a99f39 MK |
65 | .BR mq_getattr (3), |
66 | .BR mq_notify (3), | |
67 | .BR mq_open (3), | |
68 | .BR mq_receive (3), | |
69 | .BR mq_send (3), | |
70 | .BR mq_unlink (3), | |
71 | .BR mq_overview (7) |