- The Theory
- The UNIX Way
- Message Passing
- Join the Queue
- Plug It In
- Dont Tie Me Down
Join the Queue
The simplest mechanism for sending data between two POSIX processes is using a pipe, but this isn’t the only way. As well as shared memory and semaphores, POSIX specifies message queues for IPC. Unlike semaphores and message queues, however, support for POSIX message queues isn’t widespread.
As with other IPC mechanisms, the POSIX versions are slight modifications of the earlier System V APIs. These are a lot more widely supported, although since they’re rarely used they tend to become somewhat less well-debugged than other mechanisms.
To find out more about System V and POSIX message queues, look at the msgget and mq_open man pages, respectively. Don’t be surprised if one or the other doesn’t exist on your system.