osf1 man page for mq_getattr

Query: mq_getattr

OS: osf1

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

mq_getattr(3)						     Library Functions Manual						     mq_getattr(3)

NAME
mq_getattr - Returns the status and attributes of a message queue (P1003.1b)
LIBRARY
Realtime Library (librt.so, librt.a)
SYNOPSIS
#include <mqueue.h> int mq_getattr ( mqd_t mqdes, struct mq_attr *mqstat);
PARAMETERS
mqdes Specifies the message queue descriptor whose attributes are obtained. *mqstat Specifies a pointer to a structure that is updated to contain the values that were set when the message queue was created or modified by a call to the mq_setattr function. When the mq_getattr function returns, the following three members of the mq_attr structure specified by mqstat will have the values that were set when the message queue was created, but with modifications made by subsequent calls to the mq_setattr function: o The mq_maxmsg member specifies the maximum number of messages that can be held in the queue specified by the mqdes argument. o The mq_msgsize member specifies the maximum size of any message in the queue. o The mq_flags member specifies whether the message operation is blocking or nonblocking (MQ_NONBLOCK). The mq_curmsgs member of the mq_attr structure indicates the number of messages currently on the queue.
DESCRIPTION
The mq_getattr function returns the status and attributes of a message queue. Use the mq_setattr function to set message queue attributes.
RETURN VALUES
On successful completion, the function returns the value 0 (zero); otherwise, the function returns the value -1 and sets errno to indicate the error.
ERRORS
The mq_getattr function fails under the following conditions: [EBADF] The fildes argument is an invalid file descriptor. [EINVAL] The mqstat argument is a null pointer.
RELATED INFORMATION
Functions: mq_open(3), mq_receive(3), mq_send(3), mq_setattr(3) Guide to Realtime Programming delim off mq_getattr(3)
Related Man Pages
mq_getattr(3c) - opensolaris
mq_getattr(3) - centos
mq_getattr(2) - debian
mq_getattr(3) - suse
mq_setattr(3rt) - sunos
Similar Topics in the Unix Linux Community
Permission denied when creating message queue
utime returning -1 BAD File DEscriptor