cgk@chinet.chi.il.us (Charlie Kester) (05/14/91)
I am having a problem with msgrcv() under SCO System V Xenix on a '286. Most of the time this system call works just fine, but every now and then it ails with errno set to EINVAL. The manual says this will be the errno when (a) the queue id is invalid (b) an attempt is made to receive into read-only shared memory (c) the message size requested is less than zero Only the first can be the case in my code, since I'm not using shared memory and the message size is a #defined constant. So the tion is: what can cause a previously-valid queue id to become invalid? I already know that if I use the out-of-the-box defaults for MSGMAP, etc., a queue will "disappear" and msgrcv will fail when two or more messages are placed on the queue before the call to msgrcv. (When this occurs, ipcs -qo shows 0 messages but NOT 0 bytes on the queue. And ipcrm doesn't reenable the queue -- the system has to be rebooted.) I have corrected the tunable parameters to avoid this fault, but I still lose the queue id every now and then. Since there is this undocumented failure mode, I have to think there are others. Please reply by email. -- Charlie Kester | cgk@chinet.chi.il.us | "Wretches, utter wretches! 1503 Larson Street | | keep your hands from beans!" Sycamore IL 60178 | | (Empedocles)