This project is a small data exchange program using UNIX signals. You need to communicate two separate processes. One of them will be the server and the other one will be the client.
The project is divided into two parts Mandatory and Bonus, every part has two programs, one for the server and the other one for the client.
• server: The server runs first, displays its PID, and waits for the client to send a message.
• client: The client takes the server's PID and a string as arguments, sends the string to the server.
The server displays the string. The string can contain Unicode characters in the bonus part.
To get started using minitalk, you need to clone the repository and run the following commands:
git clone https://github.com/whoismtrx/42_minitalk.git minitalk
cd minitalk
makeTo run the server, you should run the executable named server with no arguments:
./server
PID : 12345To run the client, you need to provide the server's PID and a string as arguments:
./client 12345 "Hello, World!"The server and the client communicate using UNIX signals SIGUSR1 and SIGUSR2. The server waits for the client to send signals, the client iterates over the string characters, looks for the bit representation of the characters, and sends a signal to the server for each bit, SIGUSR1 or SIGUSR2 for 1 or 0 depending on the bit value and what signal you choose to represent it. The server receives the signals and reconstructs the string.
• Introduction To Unix Signals Programming
• Why is Sigaction() a better option than Signal()
• Characters, Symbols and the Unicode Miracle
minitalk/
├── include/
│ └── (header files)
├── src/
│ └── (source files)
├── Makefile
└── README.md
This repository is for educational purposes only, documenting my work on the 42 curriculum. These solutions are intended as a reference for students who have already completed or are actively working on the project.