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

NAME

12       mq_unlink - remove a message queue (REALTIME)
13

SYNOPSIS

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

DESCRIPTION

21       The mq_unlink() function shall remove the message queue  named  by  the
22       pathname name. After a successful call to mq_unlink() with name, a call
23       to mq_open() with name shall fail if the flag O_CREAT  is  not  set  in
24       flags.  If  one  or  more  processes  have  the message queue open when
25       mq_unlink() is called, destruction of the message queue shall be  post‐
26       poned until all references to the message queue have been closed.
27
28       Calls  to  mq_open()  to  recreate the message queue may fail until the
29       message queue is actually removed. However, the mq_unlink()  call  need
30       not  block until all references have been closed; it may return immedi‐
31       ately.
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       ENAMETOOLONG
45              The length of the name argument exceeds {PATH_MAX} or a pathname
46              component is longer than {NAME_MAX}.
47
48       ENOENT The named message queue does not exist.
49
50
51       The following sections are informative.
52

EXAMPLES

54       None.
55

APPLICATION USAGE

57       None.
58

RATIONALE

60       None.
61

FUTURE DIRECTIONS

63       None.
64

SEE ALSO

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