This commit is contained in:
Lorenzo Bianchi 2023-05-16 16:29:49 +02:00
parent 2c0b9a364a
commit 1ce79874e9
2 changed files with 8 additions and 6 deletions

View File

@ -72,6 +72,7 @@ int client(){
// SEM
key_t semKey = ftok(KEYFILE, 'S');
int semid;
if ((semid = semget(semKey, 2, S_IRUSR | S_IWUSR | IPC_CREAT)) == -1) {
errExit("getsem", "F4Client");
}

View File

@ -13,6 +13,13 @@
#include <custom_shm.h>
#include <errExit.h>
int semid;
int msgid;
int shmid;
tile_t *board;
void sigHandlerServer(int sig) {
if (sig == SIGINT) {
//TODO:
@ -45,12 +52,6 @@ void sigHandlerServer(int sig) {
exit(0);
}
int semid;
int msgid;
int shmid;
tile_t *board;
int main(int argc, char *argv[]){
input_server_t input = check_input(argc, argv);