#include <mqueue.h>
int mq_unlink(const char *name);
The mq_unlink() function removes
the message queue with the specified name.
After the named message queue has been removed,
a call to mq_open() with name fails
if the O_CREAT flag is not set in flags.
When one or more processes have the named message queue open, the removal
of the message queue is postponed until all references to the message
queue have been closed.
mq_open() calls to recreate the message queue
open up a new queue with no relation to the previous named object.
- name
-
Points to the name of the message queue to be removed.
On success, mq_unlink() returns 0.
On failure, the named message queue is unchanged, and
mq_send() returns -1 and sets errno
to one of the following:
- EACCES
-
Permission is denied to unlink the named message queue.
- ENAMETOOLONG
-
The length of the name argument exceeds {PATH_MAX}.
- ENOENT
-
The named message queue does not exist.
UNIX 03.
MT-Safe.
None.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
- Functions:
- mq_close(), mq_open(), msgctl(), msgget(), msgrcv(), msgsnd()
MKS Toolkit 9.3 Documentation Build 6.