NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <mqueue.h>int mq_unlink(const char *name);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
POSIX_MQ
The mq_unlink system call removes the message queue named by the pathname name. After a successful call to mq_unlink with name, a call to mq_open with name will fail if the flag O_CREAT is not set in flags. If one or more processes have the message queue open when mq_unlink is called, destruction of the message queue will be postponed until all references to the message queue have been closed. However, the mq_unlink call is not blocked and returns immediately.
Upon successful completion, mq_unlink returns a value of 0. Otherwise, the named message queue will not be changed by this call, it will return -1, and set errno to indicate one of the following error conditions.
The mq_unlink function is not supported.
The MQ feature [_POSIX_MESSAGE_PASSING] option (see sysconf(3POSIX)) is not configured.
The name string exceeds MQ_PATHMAX as returned by sysconf(3POSIX).
The message queue referenced by name does not exist.
name points outside the allocated address space of the process.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO