Modern operating systems provide a number of IPC mechanisms beyond the shared files we have already learned about, namely the following:
- Named pipes
- Local sockets
- Network sockets
- Shared memory
It is interesting that many of them provide exactly the same API that we use when working with regular files. As a result, switching between these types of IPC is trivial and the same code that we used to read and write to local files can be used to communicate with applications running on a remote network host.
In this recipe, we will learn how to use Portable Operating System Interface (POSIX) named pipes to communicate between two applications that reside on the same computer.