September 2001
Intermediate to advanced
768 pages
32h 45m
English
int shm_attach(int key, [int memsize], [int permissions])
| key | Unique key for the script’s shared memory segment |
| memsize | Size of the shared memory segment, in bytes |
| permissions | Permissions for the shared memory segment |
Attaches to a shared memory segment, creating it if necessary.
Returns:
Shared memory ID on success; FALSE on failure
Description:
shm_attach() takes as its first argument a key that it uses to identify the shared memory segment to which you want to attach.Any process can use the same key to attach to this segment, which allows the sharing of the memory. It’s a good idea to attempt to make this key unique to the scripts that will be using it, so as not to conflict with other programs that might use the same key. ...
Read now
Unlock full access