Messages queues in SCO XENIX 386

Ralf Zehender ralf at pemstgt.PEM-Stuttgart.de
Thu Jan 10 00:53:46 AEST 1991



I have a problem belonging to the message queues at SCO-XENIX Version 2.3.3
386.
Can anybody help me getting the correct status, especially the permission
mode value?

My situation is the following:
I wrote different not urgent typed messages into a queue and started a reader
process waiting for one special type, told the urgent type.
Now I want to check if there is some space for a message of a not-urgent type,
remembering that there must be space for at least one urgent one. But this
check may perform just in the situation that there is really a urgent
messages reader process, since all the other reading operations take all
types of messages. 
I thought that I could solve the problem by executing a msgctl-call getting
the status, comparing the msg_cbytes with the high water level && looking
for the bit in msg_perm.mode, that indicates, if or if not a process is 
waiting for a message. 
But this bit ( in the ipcs -a screen indicated as a 'R' ) in the first
moment following a queue write operation of a not urgent message 
referres not my process's reading !
It looks like that the kernel needs some (unknown) time for checking the not
urgent messages in the queue which are not the right ones and then setting
the mode bit.

Thanks for answers Ralf.



More information about the Comp.unix.questions mailing list