mq_unlink()

remove a message queue 

Realtime Function


SYNOPSIS

#include <mqueue.h>

int mq_unlink(const char *name);


DESCRIPTION

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.


PARAMETERS

name 

Points to the name of the message queue to be removed.


RETURN VALUES

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.


CONFORMANCE

UNIX 03.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
mq_close(), mq_open(), msgctl(), msgget(), msgrcv(), msgsnd()


PTC MKS Toolkit 10.3 Documentation Build 39.