Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
10-20-2012, 06:37 AM #1
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
c, cygwin- Set maximum messages in queue- msgctl
I would like to increase the number of messages allowed in the queue for msgsnd and msgrcv. Currently, when I print off the number of messages, it stops at 33 and freezes. No error message is given after msgsnd. If I set the flag to IPC_NOWAIT, the error message is "resource temporarily unavailable" and won't send the message. I need the queue to be at least 320. I've looked on the MSGCTL() man page but couldn't find a way to increase the number of messages, just the number of bytes. If I increase the bytes- msgBuf->msg_qbytes = 65535; I have the exact same problem yet if I decrease it- msgBuf->msg_qbytes = 50; I get 3 messages before it the error message "resource temporarily unavailable". With 100 I get 31 messages, so size doesn't seem to be the issue. I have looked for a long time on man pages and forums but have had no luck!
Any help would be great!