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

NAME

6       mq_unlink - remove a message queue (REALTIME)
7

SYNOPSIS

9       #include <mqueue.h>
10
11       int mq_unlink(const char *name);
12
13

DESCRIPTION

15       The  mq_unlink()  function  shall remove the message queue named by the
16       pathname name. After a successful call to mq_unlink() with name, a call
17       to  mq_open()  with  name  shall fail if the flag O_CREAT is not set in
18       flags. If one or more  processes  have  the  message  queue  open  when
19       mq_unlink()  is called, destruction of the message queue shall be post‐
20       poned until all references to the message queue have been closed.
21
22       Calls to mq_open() to recreate the message queue  may  fail  until  the
23       message  queue  is actually removed. However, the mq_unlink() call need
24       not block until all references have been closed; it may return  immedi‐
25       ately.
26

RETURN VALUE

28       Upon  successful completion, the function shall return a value of zero.
29       Otherwise, the named message queue shall be unchanged by this  function
30       call,  and  the  function  shall  return a value of -1 and set errno to
31       indicate the error.
32

ERRORS

34       The mq_unlink() function shall fail if:
35
36       EACCES Permission is denied to unlink the named message queue.
37
38       ENAMETOOLONG
39              The length of the name argument exceeds {PATH_MAX} or a pathname
40              component is longer than {NAME_MAX}.
41
42       ENOENT The named message queue does not exist.
43
44
45       The following sections are informative.
46

EXAMPLES

48       None.
49

APPLICATION USAGE

51       None.
52

RATIONALE

54       None.
55

FUTURE DIRECTIONS

57       None.
58

SEE ALSO

60       mq_close()  ,  mq_open()  , msgctl() , msgget() , msgrcv() , msgsnd() ,
61       the Base Definitions volume of IEEE Std 1003.1-2001, <mqueue.h>
62
64       Portions of this text are reprinted and reproduced in  electronic  form
65       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
66       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
67       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
68       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
69       event of any discrepancy between this version and the original IEEE and
70       The Open Group Standard, the original IEEE and The Open Group  Standard
71       is  the  referee document. The original Standard can be obtained online
72       at http://www.opengroup.org/unix/online.html .
73
74
75
76IEEE/The Open Group                  2003                         MQ_UNLINK(P)
Impressum