mq_setattr (2)
Leading comments
Copyright (c) 2005 David Xu <davidxu@FreeBSD.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice(s), this list of conditions and the following disclaimer as the first lines of this file unmodified other than the possible addition of one or more copyright notices. 2. Redistributions in b...
NAME
mq_setattr - set message queue attributes (REALTIME)LIBRARY
Lb librtSYNOPSIS
In mqueue.h Ft int Fo mq_setattr Fa mqd_t mqdes Fa const struct mq_attr *restrict mqstat Fa struct mq_attr *restrict omqstat FcDESCRIPTION
The Fn mq_setattr system call sets attributes associated with the open message queue description referenced by the message queue descriptor specified by Fa mqdes . The message queue attributes corresponding to the following members defined in the Vt mq_attr structure will be set to the specified values upon successful completion of Fn mq_setattr :- mq_flags
- The value of this member is zero or O_NONBLOCK
The values of the mq_maxmsg , mq_msgsize and mq_curmsgs members of the Vt mq_attr structure are ignored by Fn mq_setattr .
RETURN VALUES
Upon successful completion, the function returns a value of zero and the attributes of the message queue will have been changed as specified.Otherwise, the message queue attributes are unchanged, and the function returns a value of -1 and sets the global variable errno to indicate the error.
ERRORS
The Fn mq_setattr system call will fail if:- Bq Er EBADF
- The Fa mqdes argument is not a valid message queue descriptor.