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

  man pages->HP-UX 11i man pages -> mq_close (2)              


 mq_close(2)                                                     mq_close(2)

 NAME    [Toc]    [Back]
      mq_close - close a message queue descriptor

 SYNOPSIS    [Toc]    [Back]
      #include <sys/mqueue.h>

      int mq_close(mqd_t mqdes);

 DESCRIPTION    [Toc]    [Back]
      The mq_close() system call removes the association between the message
      queue descriptor, mqdes, and a message queue. Use of this message
      queue descriptor by the process, after a successful return from this
      mq_close(), and until this descriptor is returned by a subsequent
      mq_open(), will result in the failure of message queue system calls,
      with errno set to [EBADF].

      If the process has a registered notification request with the message
      queue associated with this mqdes, the registration is canceled and the
      queue becomes available for another process to register a notification

      If the message queue has been unlinked and mqdes is the only existing
      open descriptor for the queue, the queue is destroyed.

      To use this function, link in the realtime library by specifying -lrt
      on the compiler or linker command line.

 RETURN VALUE    [Toc]    [Back]
      mq_close() returns the following values:

           0    Successful completion.

           -1   Failure.  errno is set to indicate the error.

 ERRORS    [Toc]    [Back]
      If mq_close() fails, errno is set to one of the following values:

           [EBADF]        mqdes is not a valid message queue descriptor.

           [ENOSYS]       mq_close() is not supported by the implementation.

 SEE ALSO    [Toc]    [Back]
      mq_open(2), mq_unlink(2), mq_notify(2).

      mq_close(): POSIX 1003.1b

 Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Sep 2004
[ 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