PHP 8.5.0 Beta 1 available for testing

Voting

: five plus three?
(Example: nine)

The Note You're Voting On

Craig Manley
20 years ago
Since there is no mention of the (lack of) need for locking here, I took a look into the shmop.c extensions code. So correct me if I'm wrong, but the shmop.c extension uses memcpy() to copy strings to and from shared memory without any form of locking, and as far as I know, memcpy() is not atomic.

If that's true as I suspect, then these 'easy to use' functions are not so 'easy to use' any more and have to be wrapped in locks (e.g. semaphores, flocks, whatever).

<< Back to user notes page

To Top