I am writing a mini program in Linux
I have a message queue which has a default maximum capacity of
bytes that can be written in it.
I am trying to modify this capacity. I googled for a solution and tried
to change the value of (msg_qbytes) by writing these instructions :
int msgflg = IPC_CREAT | 0666;
struct msqid_ds msqid_ds,*BUF;
BUF = &msqid_ds;
msqid = msgget(key,msgflg);
BUF->msg_qbytes = 50;
After that I wrote some instruction to test the ability of
queue of recieving messages ,but I found that the message queue still recieving
amount of messages more than 50 bytes which shows that the capacity af the
message queue haven't changed.
Would you plz guide me to a solution for this problem?