mq_setattr - Sets the mq_flags attributes associated with a message queue (P1003.1b)
int mq_setattr (
const struct mq_attr *mqstat,
struct mq_attr *omqstat);
Sets the mq_flags attributes associated with the message queue descriptor for the calling process. Only the blocking attribute of the queue for the calling process can be modified through this call. Modifying the blocking attribute for a queue has no effect on currently blocked processes. Other members of the mq_attr structure are ignored by the mq_setattr function.
On successful completion, the function returns the value 0 and the message queue attributes will have been changed as specified.
Otherwise, the value -1 is returned, errno is set to indicate the error, and the message queue attributes remain unchanged.
The mq_setattr function fails under the following conditions:
Functions: mq_open(3), mq_send(3) delim off