*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> mq_close (3c)              


mq_close(3c)							  mq_close(3c)

NAME    [Toc]    [Back]

     mq_close -	close a	message	queue descriptor

C SYNOPSIS    [Toc]    [Back]

     #include <mqueue.h>

     mqd_t mq_close (mqd_t mqd<b>);

DESCRIPTION    [Toc]    [Back]

     mq_close closes the connection between message queue descriptor, mqd, and
     its associated queue. The descriptor, mqd,	should have been obtained from
     a prior call to mq_open(3c). No messages are added	or removed from	the

     If	multiple threads within	a common process (i.e.,	sprocs,	pthreads) are
     sharing mqd, a single call	to mq_close will close the message queue for
     all threads within	the calling process.

     If	the process has	a notification request attached	[see mq_notify(3c)] to
     the queue,	the notification request is removed and	the queue is available
     for attachment of a notification request.

     If	this is	the last queue descriptor associated with the queue and	the
     queue has been unlinked [see mq_unlink(3c)] earlier, the message queue
     will be removed.

     mq_close will fail	if one or more of the following	conditions are true:

     [EBADF]	    The	message	queue descriptor, mqd, is not valid.

     [EINTR]	    A signal interrupted the mq_close function call.

SEE ALSO    [Toc]    [Back]

     mq_open(3c), open(3c), intro(3c), mq_unlink(3c), mq_receive(3c),
     mq_send(3c), mq_getattr(3c), mq_setattr(3c), mq_notify(3c)

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of	-1 is returned and errno is set	to indicate the	error.

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
mq_open Tru64 Establishes the connection between a message queue and a message queue descriptor (P1003.1b)
mq_setattr HP-UX set the blocking status of a message queue associated with a descriptor
alCloseEventQueue IRIX close an audio event queue
close IRIX close a file descriptor
close HP-UX close a file descriptor
close Linux close a file descriptor
cr_close HP-UX close a crash dump descriptor
mq_receive Tru64 Receives the oldest, highest-priority message from the message queue (P1003.1b)
alGetEventQueueFD IRIX get the file descriptor for an audio event queue
qgetfd IRIX get the read file descriptor associated with the event queue
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service