1MQ_SETATTR(3P) POSIX Programmer's Manual MQ_SETATTR(3P)
2
3
4
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
13 mq_setattr — set message queue attributes (REALTIME)
14
16 #include <mqueue.h>
17
18 int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict mqstat,
19 struct mq_attr *restrict omqstat);
20
22 The mq_setattr() function shall set attributes associated with the open
23 message queue description referenced by the message queue descriptor
24 specified by mqdes.
25
26 The message queue attributes corresponding to the following members
27 defined in the mq_attr structure shall be set to the specified values
28 upon successful completion of mq_setattr():
29
30 mq_flags The value of this member is the bitwise-logical OR of zero
31 or more of O_NONBLOCK and any implementation-defined flags.
32
33 The values of the mq_maxmsg, mq_msgsize, and mq_curmsgs members of the
34 mq_attr structure shall be ignored by mq_setattr().
35
36 If omqstat is non-NULL, the mq_setattr() function shall store, in the
37 location referenced by omqstat, the previous message queue attributes
38 and the current queue status. These values shall be the same as would
39 be returned by a call to mq_getattr() at that point.
40
42 Upon successful completion, the function shall return a value of zero
43 and the attributes of the message queue shall have been changed as
44 specified.
45
46 Otherwise, the message queue attributes shall be unchanged, and the
47 function shall return a value of −1 and set errno to indicate the
48 error.
49
51 The mq_setattr() function shall fail if:
52
53 EBADF The mqdes argument is not a valid message queue descriptor.
54
55 The following sections are informative.
56
58 None.
59
61 None.
62
64 None.
65
67 None.
68
70 mq_open(), mq_send(), msgctl(), msgget(), 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_SETATTR(3P)