I have a program that does the following:
mysem = sem_open(semname, O_CREAT, 0644, 10);
it creates a semaphore with value 10, gets the value, and prints it out.
The problem is:
As you can see I set the value to 10
However, the output for the value is 1.
Why is it telling me that the semaphore has a value of 1 when I explicitly initialized it to 10?