Global named event equivalent in Unix
You are probably looking for a named semaphore.
int initial = 0;sem_t *sem = sem_open("/global_name", O_CREAT, 0644, initial);/* Down ("Wait"). */sem_wait(sem);/* Up ("Set") . */sem_post(sem);
You are probably looking for a named semaphore.
int initial = 0;sem_t *sem = sem_open("/global_name", O_CREAT, 0644, initial);/* Down ("Wait"). */sem_wait(sem);/* Up ("Set") . */sem_post(sem);