Minitalk is a simple communication program that includes a client and a server. The server prints messages received from the client. The communication is done using UNIX signals, specifically SIGUSR1
and SIGUSR2
.
- The server prints its PID when launched.
- The client sends a string to the server using the server's PID.
- The server displays the received string quickly.
- The server can handle multiple clients in succession without restarting.
- Communication between client and server is achieved using only
SIGUSR1
andSIGUSR2
signals.
- Clone the repository:
git clone https://github.com/yourusername/minitalk.git
- Navigate to the project directory:
cd minitalk
- Compile the server and client programs:
make
-
Start the server:
./server
- The server will print its PID, which will be used by the client.
-
Start the client with the server's PID and the string to send:
./client <server_pid> "<message>"
Example:
./client 12345 "Hello, World!"
SIGUSR1
: Represents a binary 0.SIGUSR2
: Represents a binary 1.