Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_unlink.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_unlink.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_unlink.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_unlink.html on line 8

mq_unlink()

Remove a queue

Synopsis:

#include <mqueue.h>

int mq_unlink( const char* name );

Arguments:

name
The name of the message queue that you want to unlink.

Library:

Description:

The mq_unlink() function removes the queue with the given name.


Note: Neutrino supports two implementations of message queues: a traditional implementation, and an alternate one that uses asynchronous messages. For more information, see the entry for mq and mqueue in the Utilities Reference.

If some process has the queue open when the call to mq_unlink() is made, then the actual deletion of the queue is postponed until it has been closed. If a queue exists in the netherworld between unlinking and the actual removal of the queue, then all calls to open a queue with the given name fail (even if O_CREAT is present in oflag). Once the queue is deleted, all elements currently on it are freed. Due to the lazy deletion of queues, it's impossible for any process to be blocked on the message queue when it's deleted.

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

Returns:

-1 if the queue wasn't successfully unlinked (errno is set). Any other value indicates that the queue was successfully unlinked.

Errors:

EACCES
You don't have permission to unlink the specified queue.
ELOOP
Too many levels of symbolic links or prefixes.
ENAMETOOLONG
The length of name exceeds PATH_MAX.
ENOENT
The queue name doesn't exist.
ENOSYS
The mq_unlink() function isn't implemented for the filesystem specified in path.

Classification:

POSIX 1003.1 MSG

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

mq_close(), mq_open(), unlink()

mq, mqueue in the Utilities Reference


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_unlink.html on line 187

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mq_unlink.html on line 187