Rechercher une page de manuel
mq_getattr
Langue: en
Version: DECEMBER 2002 (mandriva - 01/05/08)
Section: 2 (Appels système)
NAME
mq_getattr - get message queue attributesSYNOPSIS
gcc [ flag... ] file ... -lmqueue [ library... ]#include <mqueue.h>
int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat);
DESCRIPTION
The mq_getattr() function is used to get 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 will 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() calls:
- mq_flags
- message queue flags
The following attributes of the message queue are returned as set at message queue creation:
- mq_maxmsg
- maximum number of messages
- mq_msgsize
- maximum message size
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_curmsgs
- the number of messages currently on the queue.
RETURN VALUES
Upon successful completion, mq_getattr() returns 0; otherwise, the function returns -1 and sets errno to indicate the error condition.DIAGNOSTICS
The mq_getattr() function will fail if:- EBADF
- The mqdes argument is not a valid message queue descriptor.
- EINVAL
- The mqstat argument is set to NULL.
- EFAULT
- mqstat points outside your accessible address space.
AUTHORS
Krzysztof Benedyczak <golbi@mat.uni.torun.pl>Michal Wronski <wrona@mat.uni.torun.pl>
CONFORMING TO
IEEE Std 1003.1-2001SEE ALSO
mq_setattr(2) mq_open(2)Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre