Второй параметр proj_id. Что это?
proj_id
#include <sys/types.h> #include <sys/ipc.h> key_t ftok (const char *pathname, int proj_id);