I receive msgsnd: Invalid argument error while using my program. Another thing i noted is that error do not occur if the file size is medium while it occurs when file size is slightly more. Is is due to memory overflow? If yes then what is the solution. Regards, Bhavin.
A:
msgsnd()
returns EINVAL
if the msgsz
parameter is greater than MSGMAX
(which is usually quite a small value, like 8192).
What msgsz
are you using?
caf
2010-05-21 01:01:13
Thanks caf. I found that size of the pkt which i am using is almost 12000. It is the size of pkt which is causing me prblm. Can we change the value of MSGMAX?Regards,Bhavin.
bhavin
2010-05-21 06:43:17
That depends on the operating system. On Linux, it can be changed system-wide with the `kernel.msgmax` sysctl (accessible at `/proc/sys/kernel/msgmax`).
caf
2010-05-21 06:58:09
Thanks caf i changed it by explicitly using that parameter in /etc/sysctl.conf file and using sysctl -p.Thanks again caf for your reply.Regards,Bhavin
bhavin
2010-05-21 11:35:42