|SHMGET(2)||System Calls Manual||SHMGET(2)|
shmget — get
shared memory area identifier
key, size_t size,
returns the shared memory identifier associated with the key
A shared memory segment is created if either
key is equal to
or key does not have a shared memory segment
identifier associated with it, and the
is set in shmflg.
If a new shared memory segment is created, the data structure associated with it (the shmid_ds structure, see shmctl(2)) is initialized as follows:
Upon successful completion a positive shared memory segment identifier is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
IPC_EXCLare set in shmflg, and a shared memory segment is already associated with key.
IPC_CREATwas not set in shmflg and no shared memory segment associated with key was found.
|November 15, 2014||OpenBSD-current|