1MQ_UNLINK(3P)              POSIX Programmer's Manual             MQ_UNLINK(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       mq_unlink — remove a message queue (REALTIME)
14

SYNOPSIS

16       #include <mqueue.h>
17
18       int mq_unlink(const char *name);
19

DESCRIPTION

21       The mq_unlink() function shall remove the message queue  named  by  the
22       string name.  If one or more processes have the message queue open when
23       mq_unlink() is called, destruction of the message queue shall be  post‐
24       poned  until all references to the message queue have been closed. How‐
25       ever, the mq_unlink() call need not block  until  all  references  have
26       been closed; it may return immediately.
27
28       After  a successful call to mq_unlink(), reuse of the name shall subse‐
29       quently cause mq_open() to behave as if no message queue of  this  name
30       exists  (that  is,  mq_open()  will fail if O_CREAT is not set, or will
31       create a new message queue if O_CREAT is set).
32

RETURN VALUE

34       Upon successful completion, the function shall return a value of  zero.
35       Otherwise,  the named message queue shall be unchanged by this function
36       call, and the function shall return a value of  −1  and  set  errno  to
37       indicate the error.
38

ERRORS

40       The mq_unlink() function shall fail if:
41
42       EACCES Permission is denied to unlink the named message queue.
43
44       ENOENT The named message queue does not exist.
45
46       The mq_unlink() function may fail if:
47
48       ENAMETOOLONG
49              The  length  of  the  name argument exceeds {_POSIX_PATH_MAX} on
50              systems  that  do  not  support  the  XSI  option   or   exceeds
51              {_XOPEN_PATH_MAX}  on  XSI  systems, or has a pathname component
52              that is longer than {_POSIX_NAME_MAX} on  systems  that  do  not
53              support  the  XSI option or longer than {_XOPEN_NAME_MAX} on XSI
54              systems.  A call to mq_unlink() with a name argument  that  con‐
55              tains  the  same  message queue name as was previously used in a
56              successful mq_open()  call  shall  not  give  an  [ENAMETOOLONG]
57              error.
58
59       The following sections are informative.
60

EXAMPLES

62       None.
63

APPLICATION USAGE

65       None.
66

RATIONALE

68       None.
69

FUTURE DIRECTIONS

71       A  future version might require the mq_open() and mq_unlink() functions
72       to have semantics similar to normal file system operations.
73

SEE ALSO

75       mq_close(), mq_open(), msgctl(), msgget(), msgrcv(), msgsnd()
76
77       The Base Definitions volume of POSIX.1‐2008, <mqueue.h>
78
80       Portions of this text are reprinted and reproduced in  electronic  form
81       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
82       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
83       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
84       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
85       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
86       event of any discrepancy between this version and the original IEEE and
87       The  Open Group Standard, the original IEEE and The Open Group Standard
88       is the referee document. The original Standard can be  obtained  online
89       at http://www.unix.org/online.html .
90
91       Any  typographical  or  formatting  errors that appear in this page are
92       most likely to have been introduced during the conversion of the source
93       files  to  man page format. To report such errors, see https://www.ker
94       nel.org/doc/man-pages/reporting_bugs.html .
95
96
97
98IEEE/The Open Group                  2013                        MQ_UNLINK(3P)
Impressum