Unix Network Programming, W. Richard Stevens, page 126:
Message Queues
Some form of message passing between processes is now a part of may modern operating
systems. Some operating systems restrict the passing of messages such that a proecss can
only send a message to another specific process. System V has no such restriction. In
the System V implementation of messages, all messages are stored in the kernel, and
have an associated
message queue identifier. It is this identifier, which we call an
msquid,
that identifies a particular queue of messages. Processes read and write messages to arbi-
trary queues. There is no requirement that any process be waiting for a message queue to arrive
on a queue before some other process is allowed to write a message to that queue. This is
in contrast to both pipes and FIFOs, where it made no sense to have a writer process
unless a reader process also exists. It is possible for a process to write some messages to
a queue, then exit, and have the messages read by another process at a later time.
Every message on a queue has the following attributes:
* long integer type;
*
length of the data portion of the message (can be zero);
*
data (if the
length is greater than zero).