mq_unlink - Removes a message queue (P1003.1b)
int mq_unlink (
const char *name);
Removes a message queue named by the pathname. After a successful call to this function, subsequent calls to the mq_open function fail if they specify the queue identified by the name argument and the O_CREAT flag is not set.
Close the connection to the queue with a call to the mq_close function before calling the mq_unlink function. If one or more processes have the message queue open when mq_unlink is called, destruction of the queue is postponed until all references to the message queue are removed. In this situation, the mq_unlink function returns immediately, without waiting for all queue references to be closed.
On successful completion, the function returns the value 0; otherwise, the function returns the value -1, sets errno to indicate the error, and the message queue remains.
In addition to the following errors, any error that can be returned by the open or fstat file system calls can be returned by the mq_unlink function.
Functions: mq_close(3), mq_open(3) delim off