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