MQ_GETATTR(3) | Library Functions Manual | MQ_GETATTR(3) |
mq_getattr
—
#include <mqueue.h>
int
mq_getattr
(mqd_t
mqdes, struct mq_attr
*mqstat);
mq_getattr
() function will obtain status information
and attributes of the message queue and the open message queue description
associated with the message queue descriptor.
The mqdes argument specifies a message queue descriptor.
The results are returned in the mq_attr structure referenced by the mqstat argument.
Upon return, the following members have the values associated with the open message queue description as set when the message queue was opened and as modified by subsequent mq_setattr(3) calls: mq_flags.
The following attributes of the message queue will be returned as set at message queue creation: mq_maxmsg, mq_msgsize.
Upon return, the following members within the mq_attr structure referenced by the mqstat argument will be set to the current state of the message queue:
mq_getattr
() function returns the value 0 if
successful; otherwise the value -1 is returned and the global variable
errno is set to indicate the error.
mq_getattr
() function may fail if:
EBADF
]June 7, 2010 | NetBSD 9.0 |