Minitalk is a simple communication program that uses UNIX signals to send and receive messages between two processes (a client and a server). This project demonstrates the basics of inter-process communication using UNIX signals.
- UNIX-based OS (Linux or macOS)
- GCC compiler
-
Clone the repository:
git clone https://github.com/JosephKiragu/minitalk.git
-
Change to the project directory:
cd minitalk
-
Compile the server and client:
make
-
Run the server:
./server
The server will display its process ID (PID) on the console.
-
Open a new terminal window and run the client, passing the server's PID and the message you want to send as arguments:
./client [server_pid] [message]
For example:
./client 12345 "Hello, Minitalk!"
-
The server will display the received message on the console. The client will display "sending successful" upon successful transmission.
server.c
: Contains the server program that receives messages from the client process and prints them on the console.client.c
: Contains the client program that sends messages to the server process using UNIX signals.minitalk.h
: Header file containing necessary function prototypes and includes.utility.c
: Contains utility functions for string manipulation, character output, and number conversion.
For more information on how the program works, see the detailed comments in the source code.