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
11

NAME

13       mq_getattr — get message queue attributes (REALTIME)
14

SYNOPSIS

16       #include <mqueue.h>
17
18       int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat);
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

RETURN VALUE

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

ERRORS

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

EXAMPLES

57       See mq_notify().
58

APPLICATION USAGE

60       None.
61

RATIONALE

63       None.
64

FUTURE DIRECTIONS

66       None.
67

SEE ALSO

69       mq_notify(), mq_open(), mq_send(),  mq_setattr(),  msgctl(),  msgget(),
70       msgrcv(), msgsnd()
71
72       The Base Definitions volume of POSIX.1‐2008, <mqueue.h>
73
75       Portions  of  this text are reprinted and reproduced in electronic form
76       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
77       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
78       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
79       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
80       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  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.unix.org/online.html .
85
86       Any typographical or formatting errors that appear  in  this  page  are
87       most likely to have been introduced during the conversion of the source
88       files to man page format. To report such errors,  see  https://www.ker
89       nel.org/doc/man-pages/reporting_bugs.html .
90
91
92
93IEEE/The Open Group                  2013                       MQ_GETATTR(3P)
Impressum