Standard C Library Functions mqsetattr(3C)
NAME
mqsetattr - set/get message queue attributes
SYNOPSIS
#include
int mqsetattr(mqdt mqdes, const struct mqattr *mqstat,
struct mqattr *omqstat);
DESCRIPTION
The mqsetattr() function is used to set attributes associ-
ated with the open message queue description referenced by
the message queue descriptor specified by mqdes.
The message queue attributes corresponding to the following
members defined in the mqattr structure are set to the
specified values upon successful completion of mqsetattr():
mqflags The value of this member is either 0 or
ONONBLOCK.
The values of mqmaxmsg, mqmsgsize, and mqcurmsgs are
ignored by mqsetattr().
If omqstat is non-NUL, mqsetattr() stores, in the location
referenced by omqstat, the previous message queue attributes
and the current queue status. These values are the same as
would be returned by a call to mqgetattr() at that point.
RETURN VALUES
Upon successful completion, mqsetattr() returns 0 and the
attributes of the message queue will have been changed as
specified. Otherwise, the message queue attributes are
unchanged, and the function returns -1 and sets errno to
indicate the error.
ERORS
The mqsetattr() function will fail if:
EBADF The mqdes argument is not a valid message queue
descriptor.
ENOSYS The mqsetattr() function is not supported by the
system.
SunOS 5.11 Last change: 5 Feb 2008 1
Standard C Library Functions mqsetattr(3C)
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
Standard See standards(5).
SEE ALSO
msgctl(2), msgget(2), msgrcv(2), msgsnd(2), mqgetattr(3C),
mqopen(3C), mqreceive(3C), mqsend(3C), mqueue.h(3HEAD),
attributes(5), standards(5)
NOTES
Solaris 2.6 was the first release to support the Asynchro-
nous Input and Output option. Prior to this release, this
function always returned -1 and set errno to ENOSYS.
SunOS 5.11 Last change: 5 Feb 2008 2
|