[Previous]
[Contents]
[Next]

mq_unlink()

delete a message queue

Synopsis:

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

Description:

This call removes the queue name:

Calling unlink() with a name that resolves to the message queue server's namespace (for example, /dev/mqueue/my_queue) is analogous to calling mq_unlink() with name set to the last element of the pathname (for example, my_queue).

Returns:

0
Success
-1
An error occurred. errno is set to indicate the error.

Errors:

EACCES
You don't have permission to unlink the specified queue.
EINVAL
The name parameter is NULL.
ENAMETOOLONG
The length of name exceeds PATH_MAX.
ENOENT
The queue name doesn't exist.

Classification:

POSIX 1003.4

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread No

Caveats:

In order to use the mq_... functions, you must:

See also:

errno, mq_close(), mq_getattr(), mq_notify(), mq_open(), mq_receive(), mq_send(), mq_setattr()

chapter on POSIX.4 message queues


[Previous]
[Contents]
[Next]