Open System Services System Calls Reference Manual (G06.25+, H06.03+)

shmget(2) OSS System Calls Reference Manual
segment.
Use From the Guardian Environment
If called from a Guardian process, the function call fails and errno is set to the value of [ENO-
TOSS].
NOTES
The shared memory identier is not the Guardian environment segid value or segment identier.
Programs should not be written to depend upon the maximum number of attached shared seg-
ments. This limit is subject to change.
The maximum number of attached segments decreases when the size of any attached segment
exceeds SHMLBA.
Programs should not be written to depend upon the region size. The region size is subject to
change.
Refer to the SEGMENT_ALLOCATE_ procedure description in the
Guardian Procedure Calls
Reference Manual for more information about segment limits.
RETURN VALUES
Upon successful completion, a nonnegative shared memory identier is returned. Otherwise, the
value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the shmget() function sets errno to the corresponding
value:
[EACCES] A shared memory identier already exists for the key parameter, but operation
permission as specied by the low-order nine bits of the shmag parameter was
not granted.
[EEXIST] A shared memory identier already exists for the key parameter, but
IPC_CREAT and IPC_EXCL were both set in the shmag parameter.
[EINVAL] One of the following conditions is true:
The value of the size parameter is less than the system-dened minimum
or greater than the system-dened maximum (larger than 4 regions).
A shared memory identier already exists for the key parameter, but the
number of bytes allocated for the region is less than size and size is not
equal to 0 (zero).
[ENOENT] A shared memory identier does not exist for the key parameter, and
IPC_CREAT was not set in the shmag parameter.
[ENOMEM] An attempt was made to create a shared memory identier and its associated
shared memory table entry, but there was not enough physical memory available.
[ENOSPC] An attempt to create a new shared memory identier exceeded the system limit
on the maximum number of identiers allowed.
[ENOTOSS] The calling process is not an OSS process. The requested operation cannot be
performed from the Guardian environment.
756 Hewlett-Packard Company 527186-003