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_close.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_close.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_close.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_close.html on line 8

mq_close()

Close a message queue

Synopsis:

#include <mqueue.h>

int mq_close( mqd_t mqdes );

Arguments:

mqdes
The message-queue descriptor, returned by mq_open(), of the message queue that you want to close.

Library:

Description:

The mq_close() function removes the association between mqdes and a message queue. If the current process attaches a notify to this queue for notification, the attachment is eliminated. If this queue is unlinked before the call to mq_close(), and this process is the last process to call mq_close() on the queue, then the queue is destroyed, along with its contents.


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.

In the traditional (mqueue) implementation, calling close() with mqdes has the same effect as calling mq_close().

Returns:

-1 if an error occurred (errno is set). Any other value indicates success.

Errors:

EBADF
Invalid queue mqdes.

Classification:

POSIX 1003.1 MSG

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

See also:

mq_open(), mq_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_close.html on line 160

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_close.html on line 160