A messaging project from 42 School based on inter-process communication using signals.
Minitalk is an individual project at 42 School that challenges students to implement a simple yet robust communication system between processes using UNIX signals. In this project, a server process waits for incoming messages sent by a client process using SIGUSR1 and SIGUSR2 signals. The goal is to reliably transmit complete messages from the client to the server, handling data conversion and synchronization without using standard inter-process communication methods.
For the bonus part, I extended the project capabilities to handle more complex scenarios such as:
- Enhanced communication protocol: Allowing for larger and multibyte messages.
- Reliable transmission: Implementations to confirm message receipt and handle potential data loss.
- Improved synchronization: Managing the signal flow efficiently even with overlapping transmissions.
- Signal-Based Communication: Uses UNIX signals (
SIGUSR1andSIGUSR2) to transmit data bit by bit. - Server-Client Architecture:
- Server: Continuously listens for incoming signals and reconstructs messages.
- Client: Converts the message into binary format and sends it to the server.
- Bonus Implementations:
- Support for extended messaging, ensuring that the entire message is reliably transmitted.
- Implemented acknowledgement signals for improved synchronization between client and server.
- Error Handling: Robust error handling to manage unexpected signals and invalid inputs.
- C — Core programming language.
- Makefile — Build automation tool.
- UNIX Signals — For inter-process communication.
Clone the repository and use the following commands in your terminal:
# Compile the project
make all
# Compile the bonus
make bonus
# Remove object files
make clean
# Remove object files and executable
make fclean
# Clean and recompile
make re
Start the server first, which will display its PID, ready to receive messages:
./server
How to Run the Client
In another terminal, run the client with the server PID and the message as arguments:
./client <SERVER_PID> "Your message here"
Example:
./client 12345 "Hello, 42 School!"The implementation was thoroughly tested using multiple scenarios, including:
- Sending short and long messages.
- Handling multibyte characters.
- Simulating rapid consecutive messages to validate synchronization.
- Bonus: Stress tests for ensuring reliable transmission under heavy loads.
Additional custom scripts and tools were developed to simulate edge cases and verify the successful receipt of messages by the server.
Here’s my score for the Minitalk project:
Feel free to reach out or contribute to this project on GitHub!

