[Previous]
[Contents]
[Next]

mq_getattr()

get the current attributes of a queue

Synopsis:

#include <mqueue.h>
int mq_getattr( mqd_t mqdes, 
                struct mq_attr *mqstat );

Description:

The mq_getattr() function is used to determine the current attributes of the queue referenced by the message-queue descriptor mqdes. These attributes are stored in the location pointed to by mqstat. For information on the fields of the mq_attr structure, see "Message-queue structures" in the chapter on POSIX.4 message queues.

Returns:

0
Success
-1
An error occurred. errno is set to indicate the error.

Errors:

EBADF
mqdes doesn't represent a valid message queue.
EINVAL
mq_attr is NULL.

Classification:

POSIX 1003.4 with extensions

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

Caveats:

In order to use the mq_... functions, you must:

See also:

errno, mq_close(), mq_notify(), mq_open(), mq_receive(), mq_send(), mq_setattr(), mq_unlink()

chapter on POSIX.4 message queues


[Previous]
[Contents]
[Next]