n Successful completion. The function returns a non-negative integer shared memory identifier. -1 Indicates an error. The function sets errno to one of the following values: o EACCESS - A shared memory identifier exists for the key, but the operation permission as specified by the low order 9 bits of shmflg are not granted. o EEXIST - A shared memory identifier exists for a key but ((shmflg & IPC_CREAT) && (shmflg & IPC_EXCL)) is non-zero. o EINVAL - The value of size is either less than SHMMIN, greater than the SHMMAX, or a shared memory identifier exists for a key, but the size is greater than the size of that segment. With current implementation SHMMIN is defined to 1 byte and SHMMAX is defined to 512 MB. O ENOENT - A shared memory identifier does not exist for a key and (shmflg & IPC_CREAT) is equal to zero. O ENOSPC - A shared memory identifier is to be created but the system-imposed limit on the maximum number of allowed shared memory segments system-wide is exceeded. o EVMSERR - OpenVMS specific non-translatable error code.