Minitalk is a project from 42 school that explores fundamental concepts of interprocess communication (IPC) in Unix-based operating systems.
The goal is to implement a messaging system between two programs using signals (SIGUSR1
and SIGUSR2
).
This project provides a hands-on introduction to signal handling and process communication in a Linux environment.
Develop two programs:
-
Server:
- Waits for messages sent by the client.
- Displays received messages in the terminal.
-
Client:
- Sends a string to the server, character by character, encoding data using signals (
SIGUSR1
andSIGUSR2
).
- Sends a string to the server, character by character, encoding data using signals (
- Signals:
- Signals are a form of asynchronous communication between processes in Unix. Examples:
SIGUSR1
andSIGUSR2
.
- Signals are a form of asynchronous communication between processes in Unix. Examples:
- Interprocess Communication (IPC):
- The exchange of information between two separate processes.
- Signal Handling:
- Using functions like
signal()
orsigaction()
to handle signals.
- Using functions like
- Sending and receiving messages between client and server.
- Accurate signal decoding to reconstruct the original message.
- Error handling for issues such as lost signals or interruptions.
- Language: C
- Operating System: Unix/Linux
- Advanced Concepts: Signal handling, IPC.
-
Compile the programs:
make
-
Run the server to get its PID:
./server
-
Run the client to send a message:
./client <server_PID> "Your message here"
- Only functions authorized by 42 can be used.
- The client must be able to send messages of any length.
- The server must display the complete message, even if transmission is slow.
minitalk |
---|
francinette |
minitalk-Tester |
Lipsum generator: Lorem Ipsum |
Get Emoji |
EmojiDB |