| VMS Help CRTL, semctl, Return Values *Conan The Librarian | 
    n or 0             Upon successful completion, the value returned
                       by the function depends on cmd as follows:
                       o  GETVAL - The value of semval
                       o  GETPID - The value of sempid
                       o  GETNCNT - The value of semncnt
                       o  GETZCNT - The value of semzcnt
                       o  All others - 0
    -1                 Indicates an error. The function sets errno to
                       one of the following values:
                       o  EACCES - Operation permission is denied to
                          the calling process.
                       o  EFAULT - The arguments passed to the
                          function are not accessible.
                       o  EINVAL - The value of semid is not a valid
                          semaphore identifier, or the value of
                          semnum is less than zero or greater than
                          or equal to sem_nsems, or the value of cmd
                          is not a valid command.
                       o  EPERM - The argument cmd is equal to IPC_
                          RMID or IPC_SET and the effective user ID
                          of the calling process is not equal to that
                          of a process with appropriate privileges
                          and it is not equal to the value of sem_
                          perm.cuid or sem_perm.uid in the data
                          structure associated with semid.
                       o  EVMSERR - OpenVMS specific nontranslatable
                          error code.
|  |