7. Advanced Interprocess Communication

7.1 Introduction

So far we’ve seen how to connect two processes with pipes, but only if the processes are related, and only if the pipes are created before one of the processes, since the only way the file descriptors can be used is if they were inherited. That’s much too restrictive for the more realistic situation in which a server is running continuously, and clients that want to talk to it come and go. We want more flexibility in setting up the connections, more control over the information flow (e.g., queues and priorities), and more efficiency if there’s a lot of data to be communicated.

Happily, today’s UNIX systems have several interprocess communication (IPC) mechanisms besides the pipes we already ...

Get Advanced UNIX Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.