Skip to content

romainlief/Chat-Inter-Process-Communication-System

Repository files navigation

Chat - Inter-Process Communication System

Description

This project implements a real-time chat system using advanced operating system concepts such as processes, named pipes (FIFO), shared memory, and signal handling. It enables communication between two users on the same machine via separate terminals, as well as with an automated bot.

Development Team

  • Romain Liefferinckx
  • Manuel Rocca
  • Rares Radu-Loghin

Project Objectives

  • Understand and apply theoretical operating system concepts
  • Master process management with fork()
  • Implement inter-process communication via named pipes (FIFO)
  • Manage shared memory for temporary message storage
  • Handle system signals (SIGINT, SIGPIPE)
  • Develop teamwork skills

Main Components

  1. Chat Program (./chat) - Main C application
  2. Chat-Bot (./chat-bot) - Bash script for automated interaction
  3. Scenario-Chat (./scenario-chat) - Automated testing script
  4. Tests - Some other tests

Installation and Compilation

Prerequisites

  • GCC (C compiler)
  • Unix/Linux system
  • Make

Compilation

make

Cleanup

make clean

Usage

User-to-User Communication Mode

# Terminal 1 (Alice)
./chat alice bob

# Terminal 2 (Bob)
./chat bob alice

Bot Mode

# Launch the bot
./chat-bot alice [bot_pseudo]

# In another terminal
./chat alice bot  # or chosen pseudo

Available Options

  • --bot : Bot mode (simplified display)
  • --manuel : Manual mode (manual message display management)

Bot Features

The chat-bot automatically responds to the following commands:

  • liste : Displays the list of files in the current directory
  • li <file> : Displays the content of a file
  • qui suis-je : Returns the bot's identity
  • au revoir : Terminates the conversation
  • Predefined keywords in liste-bot.txt

Tests

Run all tests

./tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors