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

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


 mq_setattr(2)                                                 mq_setattr(2)

 NAME    [Toc]    [Back]
      mq_setattr - set the blocking status of a message queue associated
      with a descriptor

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

      int mq_setattr(mqd_t mqdes,
                     const struct mq_attr *mqstat,
                     struct mq_attr       *omqstat,

 DESCRIPTION    [Toc]    [Back]
      The mq_setattr() system call changes the blocking status of a message
      queue associated with the descriptor, mqdes.  The blocking status that
      is modified is per message queue descriptor and another open
      descriptor for the same message queue can have a different blocking

      The argument mqstat, points to an mq_attr structure that specifies the
      blocking status desired. More specifically, if the O_NONBLOCK bit in
      the mq_flags field of the mq_attr structure is set, the descriptor is
      marked as non-blocking. Otherwise it is marked as blocking.

      If omstat is non-NULL, mq_setattr() will store in the mq_attr
      structure referenced by omqstat, the previous message queue attributes
      and the queue blocking status associated with this mqdes.  The values
      returned are the same as would be returned by a call to mq_getattr().

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

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

           0    Successful completion.

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

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

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

           [EINVAL]       mqstat does not point to a valid mq_attr
                          structure, or omqstat is non-NULL and does not
                          point to a valid mq_attr structure.

           [ENOSYS]       mq_setattr() is not supported by the

 Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Sep 2004

 mq_setattr(2)                                                 mq_setattr(2)

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

      mq_setattr(): POSIX 1003.1b

 Hewlett-Packard Company            - 2 -      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_close HP-UX close a message queue descriptor
mq_close IRIX close a message queue descriptor
mq_getattr HP-UX get status information and attributes associated with a message queue
mq_getattr Tru64 Returns the status and attributes of a message queue (P1003.1b)
miser_qinfo IRIX query information on miser queues, queue resource status, and list of jobs scheduled against a queue
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
mq_send Tru64 Places a message in the message queue (P1003.1b)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service