sem_get

int sem_get(int key, [int max_acquire], [int permissions]) 
key Key of the semaphore for which to get an ID
max_acquire Maximum number of processes that can acquire this semaphore simultaneously
permissions Permissions for the semaphore

Returns an identifier for the semaphore with the given key.

Returns:

Semaphore ID if successful; FALSE otherwise

Description:

sem_get() creates and returns an identifier that can be used to access the semaphore whose key is given in key . This semaphore can then be simultaneously acquired by at most the number of processes defined by max_acquire , which defaults to 1. The semaphore will have the permissions given by the permissions parameter, which defaults to 0666.

key is a unique integer identifier ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.