MiniTalk is a simple message-passing application that enables text-based communication between two processes using UNIX signals. This project demonstrates how to implement basic inter-process communication (IPC) in C using low-level signal handling.
- Sends messages character by character
- Uses UNIX signals (SIGUSR1 and SIGUSR2) for data transmission
- Server-client architecture
- Asynchronous communication
- Works entirely via the terminal
MiniTalk/
├── inc/ # Header files (.h)
├── libs/ # Utility libraries
├── srcs/ # Source files (.c)
├── Makefile # Build script
└── .gitmodules # Git submodules (if any)
To build the project, simply run:
makeThis will generate two executables: server and client.
./serverThis command starts the server and prints its PID (Process ID). The client will use this PID to send messages.
./client <PID> "Your message"<PID>: The PID shown by the server"Your message": The message you want to send
-
In one terminal:
./server
Output:
Server PID: 12345 -
In another terminal:
./client 12345 "Hello MiniTalk!"
The server terminal will receive and print the message character by character.
SIGUSR1andSIGUSR2represent bits0and1respectively.- Each character is sent bit-by-bit to the server.
- The server reconstructs characters from bits and prints them to stdout.
- An acknowledgment mechanism ensures proper synchronization after each bit.
- A POSIX-compliant OS (Linux, macOS, WSL, etc.)
- GCC compiler
| Target | Description |
|---|---|
make |
Compiles the entire project |
make clean |
Removes object files |
make fclean |
Cleans up all binaries and objs |
make re |
Cleans and rebuilds the project |
Feel free to fork the repository and submit pull requests. Feedback, suggestions, and contributions are always welcome!