auto chuisura player

This commit is contained in:
Lorenzo Bianchi 2023-06-16 16:50:41 +02:00
parent 01eaf5f985
commit 1184e46950
3 changed files with 5 additions and 6 deletions

View File

@ -4,8 +4,4 @@
- messaggio speciale per abbandono
- se le ipcs non si sono chiuse bene non funzia
- controllare se funzionano pareggi
- non funziona labbandono del giocatore non di turno
- se le ipcs non si sono chiuse bene non funzia

View File

@ -119,7 +119,8 @@ int main(int argc, char *argv[]) {
semOp(_SEMID, SERVER, -1);
semOp(_SEMID, SERVER, -1);
printf("tutto ok\n");
_PIDS[0] = 0;
_PIDS[1] = 0;
raise(SIGTERM);
}

View File

@ -140,6 +140,7 @@ void sigHandlerClient(int sig) {
errExit("shmdt", "sigHandlerServer");
}
}
printf("\n");
exit(0);
}
@ -160,6 +161,7 @@ void sigHandlerClient(int sig) {
// avviso server che ho ricevuto il messaggio
semOp(_SEMID, SERVER, 1);
raise(SIGTERM);
}
}