first implementation of ftok function with working test

This commit is contained in:
Aldegheri Alessandro
2023-04-01 15:23:50 +02:00
parent cd74fd521c
commit 1c4fd2c388
3 changed files with 55 additions and 3 deletions
+12 -3
View File
@@ -1,8 +1,17 @@
//test
#include <ipc/sem.h>
#include "ipc/sem.h"
#include "stdio.h"
int main()
{
long i = semget(0,0,0); //checking if the syscalls are already linked
key_t i = ftok("/test80.txt", 5); //checking if the syscalls are already linked
//long i = semget(0,0,0);
if (i == -1){
printf("Error with IPC_KEY\n");
return -1;
}
printf("IPC_KEY: %d\n", i);
return 0;
}
}