Initializing a Message Queue

msgget(2) initializes a new message
queue. It can also return the message queue ID (msqid)
of the queue corresponding to the key argument. The value passed as the msgflg argument must be an octal integer with settings for the queue's
permissions and control flags.

The MSGMNI kernel configuration option determines
the maximum number of unique message queues that the kernel supports. msgget(2) fails when this limit is exceeded.