UNIX processes on their own are boring; they are interesting when they communicate. There are many methods of “Inter-process communication”, or IPC. What are all these methods? There are many!:
open
, close
, read
, write
. The sender writes to a file; the receiver reads from it. USP: durability.pipe
, close
, read
, write
. A pipe, created with pipe
, is a byte queue. pipe
returns file descriptors for both ends. Closing both ends destroys the pipe.sigaction
, kill
. The sender can send a signal to the receiver. A signal does not have associated data.socket
, bind
-listen
-accept
/connect
, close
, read
, write
. Sockets link processes over network interfaces. USP: connecting remote processes (not just local ones).mq_open
, mq_timedreceive
, mq_timedsend
. A message queue is a bit like a pipe, but with a proper concept of messages (a message is a byte array).semget
, semop
. Used to protect common resources used by processes.shmget
and friends. A single memory location can be read/written by multiple processes. USP: communication via memory, not system calls.I wrote this because I felt like it. This post is my own, and not associated with my employer.
Jim. Public speaking. Friends. Vidrio.