0

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?

tripleee
  • 175,061
  • 34
  • 275
  • 318

0 Answers0