Bugfixed SharedMemoryBlock, added tests

This commit is contained in:
2018-04-15 20:31:35 +02:00
parent dcb059e4be
commit 612cfc2035
2 changed files with 26 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class SharedMemoryBlock
*/
public function __construct(KeyInterface $key, string $flags, int $memsize, int $perm = 0666)
{
if (!($shm_resource = shmop_open($key->getKey(), $memsize, $perm))) {
if (!($shm_resource = shmop_open($key->getKey(), $flags, $perm, $memsize))) {
throw new \RuntimeException("Unable to attach shm resource {$key}");
}