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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

56       See mq_notify().
57

APPLICATION USAGE

59       None.
60

RATIONALE

62       None.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

68       mq_notify(), mq_open(), mq_send(),  mq_setattr(),  msgctl(),  msgget(),
69       msgrcv(), msgsnd()
70
71       The Base Definitions volume of POSIX.1‐2017, <mqueue.h>
72
74       Portions  of  this text are reprinted and reproduced in electronic form
75       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
76       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
77       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
78       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
79       event of any discrepancy between this version and the original IEEE and
80       The  Open Group Standard, the original IEEE and The Open Group Standard
81       is the referee document. The original Standard can be  obtained  online
82       at http://www.opengroup.org/unix/online.html .
83
84       Any  typographical  or  formatting  errors that appear in this page are
85       most likely to have been introduced during the conversion of the source
86       files  to  man page format. To report such errors, see https://www.ker
87       nel.org/doc/man-pages/reporting_bugs.html .
88
89
90
91IEEE/The Open Group                  2017                       MQ_GETATTR(3P)
Impressum