Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!compel!her From: her@compel.UUCP (Helge Egelund Rasmussen) Newsgroups: comp.unix.wizards Subject: Help needed with System V message queues Keywords: SYSV messagequeue Message-ID: <1169@compel.UUCP> Date: 6 Aug 90 14:30:36 GMT Organization: Compel, Copenhagen, DK Lines: 34 I want to send long messages via a System V message queue. This is done by the msgsnd system call. Because of this, I need to determine the max length of a single message. The 'msgctl' call can return a value called 'msg_qbytes' which is described as 'the maximum number of bytes allowed on the queue'. This value is 4096 on our system. However, if I send a message with this length, I get return status -1 and errno = EINVAL, indicating that the message size is too big. My program works with a max length of 2000 bytes. I've found a tunable parameter called MSGMAX (current value 2048), which may be the actual max message size. The funny thing is that the max value that I can give MSGMAX is 8192, which is greater than 'msg_qbytes' (4096). Does this mean that it is possible to send messages that are bigger than the message queue??? I'm using Interactive Unix v.3.2. Questions: - Is MSGMAX the size of the biggest message I can send? - If so, what on earth do I use 'msg_qbytes' for? - How do I get the current value of MSGMAX in my program? I've tried to RTFM, but it didn't help. So, PLEASE, help.... Helge ---- Helge E. Rasmussen . PHONE + 45 31 37 11 00 . E-mail: her@compel.dk Compel A/S . FAX + 45 31 37 06 44 . Copenhagen, Denmark