OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / mq_unlink.3
1 '\" t
2 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .TH MQ_UNLINK 3 2014-06-13 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 mq_unlink \- remove a message queue
29 .SH SYNOPSIS
30 .nf
31 .B #include <mqueue.h>
32 .sp
33 .BI "int mq_unlink(const char *" name );
34 .fi
35 .sp
36 Link with \fI\-lrt\fP.
37 .SH DESCRIPTION
38 .BR mq_unlink ()
39 removes the specified message queue
40 .IR name .
41 The message queue name is removed immediately.
42 The queue itself is destroyed once any other processes that have
43 the queue open close their descriptors referring to the queue.
44 .SH RETURN VALUE
45 On success
46 .BR mq_unlink ()
47 returns 0; on error, \-1 is returned, with
48 .I errno
49 set to indicate the error.
50 .SH ERRORS
51 .TP
52 .B EACCES
53 The caller does not have permission to unlink this message queue.
54 .TP
55 .B ENAMETOOLONG
56 .I name
57 was too long.
58 .TP
59 .B ENOENT
60 There is no message queue with the given
61 .IR name .
62 .SH ATTRIBUTES
63 .SS Multithreading (see pthreads(7))
64 The
65 .BR mq_unlink ()
66 function is thread-safe.
67 .SH CONFORMING TO
68 POSIX.1-2001.
69 .SH SEE ALSO
70 .BR mq_close (3),
71 .BR mq_getattr (3),
72 .BR mq_notify (3),
73 .BR mq_open (3),
74 .BR mq_receive (3),
75 .BR mq_send (3),
76 .BR mq_overview (7)
77 .SH COLOPHON
78 This page is part of release 3.79 of the Linux
79 .I man-pages
80 project.
81 A description of the project,
82 information about reporting bugs,
83 and the latest version of this page,
84 can be found at
85 \%http://www.kernel.org/doc/man\-pages/.