I have defined as #define SNAME "/mysem"
on my two programs.
On the first I am creating the semaphore as
sem_t *sem = sem_open(SNAME, O_CREAT, 0644, 1);
The second process is creating by the first and I am trying to open the existing semaphore as
sem_t *sem = sem_open(SNAME,0);
The two returning addresses are different though. Any help?