[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'ipc' (#rtl)

shmget

Return the ID of a shared memory block, possibly creating it

Declaration

Source position: ipc.pp line 405

function shmget(

  key: TKey;

  size: size_t;

  flag: cint

):cint;

Description

shmget returns the ID of a shared memory block, described by key. Depending on the flags in flag, a new memory block is created.

flag can have one or more of the following values (combined by ORs):

IPC_CREAT
The queue is created if it doesn't already exist.
IPC_EXCL
If used in combination with IPC_CREAT, causes the call to fail if the queue already exists. It cannot be used by itself.

Optionally, the flags can be ORed with a permission mode, which is the same mode that can be used in the file system.

if a new memory block is created, then it will have size Size bytes in it.

Errors

On error, -1 is returned, and IPCError is set.


Documentation generated on: Nov 16 2015