Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

flmarsou/minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦊 What is Minitalk?

Minitalk is a simple program to learn the use of UNIX signals.
The goal is to make two terminals to communicate with one another using Process IDs (PIDs), signals, and binary encoding.

Overview:

  • Client: Sends a string to the server by encoding each bit of the message as UNIX signals. SIGUSR1 represents a binary 0, and SIGUSR2 represents a binary 1. The kill() function is used to send these signals.
  • Server: Waits for incoming signals using pause(). It decodes the signals back into a string and stores the message in a buffer. Once the full message is received, the server sends an acknowledgment signal back to the client, indicating successful reception.

⚒️ Compilation

  1. Run make to compile the server and the client.
  2. Run make re to recompile everything.
  3. Run ./server to execute the server.
  4. Run ./client <PID> "messasge" in another terminal!

🧼 Cleaning

  1. Run make clean to remove every object files.
  2. Run make fclean to remove every object files, including the executable.

📑 List of Files

  • client - Sends signals to the server, waits for an acknowledgment, and returns.
  • server - Waits for signals, prints once fully received, and sends an acknowledgment.

About

Exchange program using UNIX signals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published