Go to file
2023-10-26 18:56:42 +02:00
src updated headers 2023-10-26 18:56:42 +02:00
.gitignore update 2023-03-01 17:58:36 +01:00
LICENSE firstcommit 2023-03-01 04:36:01 +01:00
Makefile updated Makefile 2023-10-26 18:33:25 +02:00
minitalk.h updated headers 2023-10-26 18:56:42 +02:00
minitalk.pdf firstcommit 2023-03-01 04:36:01 +01:00
Readme.md readmeupdate 2023-03-11 04:22:09 +01:00
test.sh newtestsimultanious 2023-03-06 09:18:56 +01:00

Minitalk

Minitalk is a simple project that requires you to use unix signals to send over strings between 2 programs.
We can only use SIGUSR1 and SIGUSR2 and we can use the kill function to send them over


Improvements

Add support for multiple clients at the same time

Client

  • client pings server every 100 msecs, and only starts writing after receiving SIGUSR2 back
  • client sends \0 when done

Server

  • server waits for a signal when pid = 1
  • when server receives signal it sets the pid to the sender pid
  • it keeps ignoring signals from other PIDs untill it received \0 from the current pid
  • after \0 is received pid is set back to 1

Usage

  1. Simply clone or download the repository
  2. Run make in the cloned directory
  3. Start the server with ./server in the cloned directory
  4. Open a second terminal in the same directory and run ./client [PID from server] ["Message in quotes"]

Tester

Todo

  • add valgrind to tester
  • check for -Wall -Werror -Wextra

Usage

  1. Download test.sh into your own minitalk directory
  2. Make the file executable chmod +x test.sh
  3. Run ./test.sh to start the test

This project is part of the studies at 42