The initial examination of the message queue will concern control functions such as message queue creation, modification, and destruction. Message sending and receiving is covered later.
The last chapter provided a sneak peek at the message queue creation process. The function synopsis is repeated here for your convenience:
#include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> int msgget(key_t key, int flags);
The argument key must have the value IPC_PRIVATE or a valid IPC key value.
The flags argument must contain the permission bits for the new queue and IPC_CREAT if the queue is being created. The flag IPC_EXCL can be added to cause msgget(3) to return an error if the message ...