ERRORS
The sem_init() function will fail if:
[EINVAL]
The value argument exceeds SEM_VALUE_MAX.
[ENOSPC]
A resource required to initialise the semaphore has been exhausted, or the limit on semaphores (SEM_NSEMS_MAX) has been reached.
[ENOSYS]
The function sem_init() is not supported by this implementation.
[EPERM]
The process lacks the appropriate privileges to initialise the semaphore.