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 identifier is not the Guardian environment segid value or segment identifier.
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 identifier 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 identifier already exists for the key parameter, but operation
permission as specified by the low-order nine bits of the shmflag parameter was
not granted.
[EEXIST] A shared memory identifier already exists for the key parameter, but
IPC_CREAT and IPC_EXCL were both set in the shmflag parameter.
[EINVAL] One of the following conditions is true:
• The value of the size parameter is less than the system-defined minimum
or greater than the system-defined maximum (larger than 4 regions).
• A shared memory identifier 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 identifier does not exist for the key parameter, and
IPC_CREAT was not set in the shmflag parameter.
[ENOMEM] An attempt was made to create a shared memory identifier and its associated
shared memory table entry, but there was not enough physical memory available.
[ENOSPC] An attempt to create a new shared memory identifier exceeded the system limit
on the maximum number of identifiers allowed.
[ENOTOSS] The calling process is not an OSS process. The requested operation cannot be
performed from the Guardian environment.
7−56 Hewlett-Packard Company 527186-003