mq_unlink(3c) mq_unlink(3c)
mq_unlink - remove a message queue
#include <mqueue.h>
int mq_unlink (const char *mq_name<b>);
mq_unlink removes the message queue named by the pathname, mq_name. If
one or more processes has the message queue opened, the queue will be
removed after all the processes close the queue. When all the references
to the queue are gone the space occupied by the queue is released. After
a successful call to unlink, the queue, mq_name, will not be accessible
by any process that does not already have access to the queue, by a call
to mq_open(3c).
mq_unlink will fail if one or more of the following conditions are true:
[EACCES] Permission to remove the queue is denied.
[EACCES] A component of path prefix has no search permission or
does not exist.
[EINTR] A signal interrupted the mq_unlink function call.
[ENOENT] The named queue does not exist.
[ENAMETOOLONG] The length of the mq_name argument exceeds {PATH_MAX}, or
the length of a mq_name component exceeds {NAME_MAX} while
{_POSIX_NO_TRUNC} is in effect.
mq_open(3c), mq_close(3c), intro(3c), mq_receive(3c), mq_send(3c),
mq_getattr(3c), mq_setattr(3c), mq_notify(3c)
Upon successful completion, a value of 0 is returned. Otherwise, a value
of -1 is returned and errno is set to indicate the error.
PPPPaaaaggggeeee 1111 [ Back ]
|