NOTE: use Linux Bash or Windows' Linux subsystem emulator
1. Open the bash and enter system-call directory.2. With one bash window, open clientReq-server directory. Type make
3. With a second bash window, open clientExec directory. Type make
4. Open a third bash window and go into clientReq-server directory
1. With the first bash (in clientReq-server directory) execute the server process: ./server
2. With the third bash (in clientReq-server directory) exectute "clientReq": ./clientReq
Now everything is ready to begin using the program
2. Insert the name of the desired service ("stampa", "salva", "invia")
3. WIth the bash in clientExec directory execute "clientExec": ./clientExec userid server_key args
note: userid is the one chosen by the user (in clientReq)
server_key is the code returned by the server process after entering data with clientReq
args: see below
args, depending on the service chosen, is...
- service stampa: what you want to print
- service salva: the name of the destination file followed by what you want to write in it
- service invia: id key of a message queue already existing in the system followed by what you want to send in it
To kill:
NOTE: the server is only sensitive to SIGTERM. So to kill it it's necessary to throw:
killall server
PAY ATTENTION NOT TO KILL THE WRONG PROCESS!!!
In case of problems:
execute the following
ipcrm --semaphore-id X
ipcrm --shmem-id X
rm /tmp/FIFOSERVER
rm /tmp/FIFOCLIENT
(where X stands for the id of the IPC. Try starting from 0 and repeting the same command until it says
ipcrm: invalid id (X)
NOTE: this will delete some IPCs in your system. If you're aware of some needed IPC that you don't want to delete, please be sure not to insert its id key.
Now everything should work properly, otherwise open a new issue (or check existing ones) if you pleased.
Thank you.