Fatih Çil

Self-Taught Developer

Software Engineer

Programmer

Game Developer

Fatih Çil

Self-Taught Developer

Software Engineer

Programmer

Game Developer

Blog Post

Minitalk: Inter-Process Communication With Just Signals

July 8, 2022 École 42

Hi! Minitalk asks for a client and a server that exchange messages using nothing but two UNIX signals: SIGUSR1 and SIGUSR2. That is literally one bit of information per signal — so you end up streaming every character of the message bit by bit.

How it works

The client takes the server’s PID and a string, then sends each byte as eight signals (one per bit). The server reconstructs the bits into characters with a signal handler and prints the message. For the bonus, the server acknowledges every byte back to the client, turning a fire-and-forget protocol into a reliable one.

The hard parts

  • Signals are not queued: send too fast and they merge or get lost — you need acknowledgements or careful pacing.
  • Async-signal-safety: what you can safely do inside a handler is very limited.
  • Unicode: multi-byte UTF-8 characters have to survive the bit stream intact.

It is a tiny project, but it rewires how you think about processes: even with the most primitive channel imaginable, you can build a working protocol with framing, acknowledgement and error handling. My implementation is in the 42Cursus repository.

42 minitalk badge

Related Posts