Name

System V Semaphore and Shared Memory

Synopsis

These extensions provide System V-style semaphores and shared memory pools. Semaphores allow you to limit the number of processes that can simultaneously use a resource (such as a serial port), possibly even to one process at a time. Shared memory provides a pool of memory that different processes can safely read from and write into, but it does not provide safeguards against simultaneous accesses (that’s what the semaphores are for).

To use semaphores and shared memory, you must compile PHP with the --with-sysvsem[ =DIR ] (for semaphore support) and --with-sysvshm (for shared memory) directives.

Get Programming PHP 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.