]>
Commit | Line | Data |
---|---|---|
80a99f39 MK |
1 | '\" t |
2 | .\" Hey Emacs! This file is -*- nroff -*- source. | |
3 | .\" | |
4 | .\" Copyright (C) 2006 Michael Kerrisk <mtk-manpages@gmx.net> | |
5 | .\" | |
6 | .\" Permission is granted to make and distribute verbatim copies of this | |
7 | .\" manual provided the copyright notice and this permission notice are | |
8 | .\" preserved on all copies. | |
9 | .\" | |
10 | .\" Permission is granted to copy and distribute modified versions of this | |
11 | .\" manual under the conditions for verbatim copying, provided that the | |
12 | .\" entire resulting derived work is distributed under the terms of a | |
13 | .\" permission notice identical to this one. | |
c13182ef | 14 | .\" |
80a99f39 MK |
15 | .\" Since the Linux kernel and libraries are constantly changing, this |
16 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
17 | .\" responsibility for errors or omissions, or for damages resulting from | |
c13182ef MK |
18 | .\" the use of the information contained herein. |
19 | .\" | |
80a99f39 MK |
20 | .\" Formatted or processed versions of this manual, if unaccompanied by |
21 | .\" the source, must acknowledge the copyright and authors of this work. | |
22 | .\" | |
23 | .TH MQ_CLOSE 3 2006-02-25 "Linux 2.6.16" "Linux Programmer's Manual" | |
24 | .SH NAME | |
25 | mq_close \- close a message queue descriptor | |
26 | .SH SYNOPSIS | |
27 | .nf | |
28 | .B #include <mqueue.h> | |
29 | .sp | |
30 | .BI "mqd_t mq_close(mqd_t " mqdes ); | |
31 | .fi | |
32 | .SH DESCRIPTION | |
33 | .BR mq_close () | |
34 | closes the message queue descriptor | |
35 | .IR mqdes . | |
36 | ||
c13182ef | 37 | If the calling process has attached a notification request |
80a99f39 MK |
38 | to this message queue via |
39 | .IR mqdes , | |
c13182ef | 40 | then this request is removed, |
80a99f39 MK |
41 | and another process can now attach a notification request. |
42 | .SH NOTES | |
43 | All open message queues are automatically closed on process termination, | |
44 | or upon | |
45 | .BR execve (2). | |
46 | .SH RETURN VALUE | |
47 | On success | |
48 | .BR mq_close () | |
49 | returns 0; on error, \-1 is returned, with | |
c13182ef | 50 | .I errno |
80a99f39 MK |
51 | set to indicate the error. |
52 | .SH ERRORS | |
53 | .TP | |
54 | .B EBADF | |
c13182ef | 55 | The descriptor specified in |
80a99f39 MK |
56 | .I mqdes |
57 | is invalid. | |
58 | .SH CONFORMING TO | |
59 | POSIX.1-2001. | |
60 | .SH "SEE ALSO" | |
61 | .BR mq_getattr (3), | |
62 | .BR mq_notify (3), | |
63 | .BR mq_open (3), | |
64 | .BR mq_receive (3), | |
65 | .BR mq_send (3), | |
66 | .BR mq_unlink (3), | |
67 | .BR mq_overview (7) |