9.84 shmget

#define IPC_PRIVATE 0

int shmget(key_t key, size_t size, int shmflg);

This syscall fetches or creates a shared memory segment associated with key.

If key is equal to IPC_PRIVATE, a segment will be created with no associated key, and will need to be accessed by other processes only by the returned shmid.

The syscall returns a valid ID on success or -1 on failure, with the following errno:

EACCES

MAC did not allow this.

EEXISTS

An attempt to create a public segment with an already registered key happened.

ENOENT

The fetched segment is not present.