1MQ_GETATTR(3P)             POSIX Programmer's Manual            MQ_GETATTR(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       mq_getattr - get message queue attributes (REALTIME)
13

SYNOPSIS

15       #include <mqueue.h>
16
17       int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat);
18
19

DESCRIPTION

21       The  mq_getattr()  function  shall  obtain   status   information   and
22       attributes  of the message queue and the open message queue description
23       associated with the message queue descriptor.
24
25       The mqdes argument specifies a message queue descriptor.
26
27       The results shall be returned in the mq_attr  structure  referenced  by
28       the mqstat argument.
29
30       Upon  return,  the  following  members shall have the values associated
31       with the open message queue description as set when the  message  queue
32       was opened and as modified by subsequent mq_setattr() calls: mq_flags.
33
34       The  following attributes of the message queue shall be returned as set
35       at message queue creation: mq_maxmsg, mq_msgsize.
36
37       Upon return, the following members within the mq_attr structure  refer‐
38       enced  by  the mqstat argument shall be set to the current state of the
39       message queue:
40
41       mq_curmsgs
42              The number of messages currently on the queue.
43
44

RETURN VALUE

46       Upon successful completion,  the  mq_getattr()  function  shall  return
47       zero. Otherwise, the function shall return -1 and set errno to indicate
48       the error.
49

ERRORS

51       The mq_getattr() function shall fail if:
52
53       EBADF  The mqdes argument is not a valid message queue descriptor.
54
55
56       The following sections are informative.
57

EXAMPLES

59       None.
60

APPLICATION USAGE

62       None.
63

RATIONALE

65       None.
66

FUTURE DIRECTIONS

68       None.
69

SEE ALSO

71       mq_open(), mq_send(), mq_setattr(), mq_timedsend(), msgctl(), msgget(),
72       msgrcv(),     msgsnd(),     the     Base    Definitions    volume    of
73       IEEE Std 1003.1-2001, <mqueue.h>
74
76       Portions of this text are reprinted and reproduced in  electronic  form
77       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
78       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
79       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
80       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
81       event of any discrepancy between this version and the original IEEE and
82       The Open Group Standard, the original IEEE and The Open Group  Standard
83       is  the  referee document. The original Standard can be obtained online
84       at http://www.opengroup.org/unix/online.html .
85
86
87
88IEEE/The Open Group                  2003                       MQ_GETATTR(3P)
Impressum