1MQ_SETATTR(3P)             POSIX Programmer's Manual            MQ_SETATTR(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_setattr — set message queue attributes (REALTIME)
13

SYNOPSIS

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

DESCRIPTION

21       The mq_setattr() function shall set attributes associated with the open
22       message  queue  description  referenced by the message queue descriptor
23       specified by mqdes.
24
25       The message queue attributes corresponding  to  the  following  members
26       defined  in  the mq_attr structure shall be set to the specified values
27       upon successful completion of mq_setattr():
28
29       mq_flags    The value of this member is the bitwise-logical OR of  zero
30                   or more of O_NONBLOCK and any implementation-defined flags.
31
32       The  values of the mq_maxmsg, mq_msgsize, and mq_curmsgs members of the
33       mq_attr structure shall be ignored by mq_setattr().
34
35       If omqstat is non-NULL, the mq_setattr() function shall store,  in  the
36       location  referenced  by omqstat, the previous message queue attributes
37       and the current queue status.  These values shall be the same as  would
38       be returned by a call to mq_getattr() at that point.
39

RETURN VALUE

41       Upon  successful  completion, the function shall return a value of zero
42       and the attributes of the message queue  shall  have  been  changed  as
43       specified.
44
45       Otherwise,  the  message  queue  attributes shall be unchanged, and the
46       function shall return a value of -1  and  set  errno  to  indicate  the
47       error.
48

ERRORS

50       The mq_setattr() function shall 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       None.
58

APPLICATION USAGE

60       None.
61

RATIONALE

63       None.
64

FUTURE DIRECTIONS

66       None.
67

SEE ALSO

69       mq_open(), mq_send(), msgctl(), msgget(), 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_SETATTR(3P)
Impressum