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.
- Romain Liefferinckx
- Manuel Rocca
- Rares Radu-Loghin
- 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
- Chat Program (
./chat) - Main C application - Chat-Bot (
./chat-bot) - Bash script for automated interaction - Scenario-Chat (
./scenario-chat) - Automated testing script - Tests - Some other tests
- GCC (C compiler)
- Unix/Linux system
- Make
makemake clean# Terminal 1 (Alice)
./chat alice bob
# Terminal 2 (Bob)
./chat bob alice# Launch the bot
./chat-bot alice [bot_pseudo]
# In another terminal
./chat alice bot # or chosen pseudo--bot: Bot mode (simplified display)--manuel: Manual mode (manual message display management)
The chat-bot automatically responds to the following commands:
liste: Displays the list of files in the current directoryli <file>: Displays the content of a filequi suis-je: Returns the bot's identityau revoir: Terminates the conversation- Predefined keywords in
liste-bot.txt
./tests