phyver / GameShell

a game to learn (or teach) how to use standard commands in a Unix shell
GNU General Public License v3.0
2.18k stars 139 forks source link

Fix issue with the semaphore file if multiple users are using the same machine #152

Closed oliviermattelaer closed 1 week ago

oliviermattelaer commented 1 week ago

This PR, is expected to fix an issue detected for the level: processes/02_ps_kill_signal

The file /dev/shm/sem.printing_sem is the same for all users, and therefore the second user (of the same machine) can not create it since it belongs to another user. Additionally the file was never removed.

So this PR (done with the help of @damienfrancois): 1) change the name of the file to include the login of the user 2) edit clean.sh to remove such file

Thanks a lot for this wonderful game,

Olivier

phyver commented 1 week ago

Thanks for the bug report, and the fix! I merged it into the master branch (commit 6a71b2b7) and only changed some very minor things (commit 6a71b2b7).

I hope you had as much fun playing with it as I did working on it!