minitalk, a project in ring 2 of the 42 Cursus, is one of the introductory projects for the bigger UNIX projects later in the cursus. Students had the choice between minitalk
and pipex
. The purpose of minitalk is to code a small data exchange program using UNIX signals, by means of a client server communication program.
To compile and run the program, run the following commands:
# Make using the Makefile
make # Creates the server and client executables
# Run the server executable
./server # Prints PID of the server, and keeps program running
# In a separate terminal, run the client executable, using the following arguments
./client <server_pid> <string_to_send>
# e.g. ./client 3855 "Hello, world!"
Note: The bonus marks came from unicode character support (emojis). Feel free to replace the <string_to_send>
with whichever characters you'd like to test.
- Complete remaining bonus - Server acknowledgement of message
- Re-evaluate project with bonuses
I personally really enjoyed this project. The UNIX signals we were allowed to use only could communicate a 1 or 0, so the idea of breaking down strings and characters into their bit form to capitalise on the limiations of the signals to send to a separate terminal window was very interesting. Getting to use bitwise comparisons and operators to make this happen, which is slightly closer to some maths than other tasks, was also good fun.