help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

shmget

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

Declaration

Source position: ipc.pp line 201

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505