In what ways can processes communicate?
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!:
write. The sender writes to a file; the receiver reads from it. USP: durability.
write. A pipe, created with
pipe, is a byte queue.
pipereturns file descriptors for both ends. Closing both ends destroys the pipe.
kill. The sender can send a signal to the receiver. A signal does not have associated data.
write. Sockets link processes over network interfaces. USP: connecting remote processes (not just local ones).
- Message queues:
mq_timedsend. A message queue is a bit like a pipe, but with a proper concept of messages (a message is a byte array).
semop. Used to protect common resources used by processes.
- Shared memory:
shmgetand friends. A single memory location can be read/written by multiple processes. USP: communication via memory, not system calls.
More by Jim
- Your syntax highlighter is wrong
- Granddad died today
- The Three Ts of Time, Thought and Typing: measuring cost on the web
- I hate telephones
- The sorry state of OpenSSL usability
- The dots do matter: how to scam a Gmail user
- My parents are Flat-Earthers
- How Hacker News stays interesting
- Project C-43: the lost origins of asymmetric crypto
- The hacker hype cycle
- The inception bar: a new phishing method
- Time is running out to catch COVID-19
- A probabilistic pub quiz for nerds
- Smear phishing: a new Android vulnerability
Tagged . All content copyright James Fisher 2017. This post is not associated with my employer. Found an error? Edit this page.