note 16651 deleted from function.shmop-open by cmb

From: Date: Wed, 13 May 2020 09:14:51 +0000
Subject: note 16651 deleted from function.shmop-open by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-214620@lists.php.net to get a copy of this message
Note Submitter: Mitchell_Shnier at ieee dot orgZ ---- To check whether a particular shared memory segment is already created, you need to concatenate the "a" and "c" flags. For example (where $SystemKey is the Unix key used by the other process(es) with which you want to share this memory segment)...<BR> $shm_id = shmop_open($SystemKey, "ac", 0, 0); if ($shm_id) { #it is already created } else { #you need to create it with shmop_open using "c" only }<BR> Using only "a" does not work (just as using only IPC_EXCL in the Unix shmget() call is meaningless). Also, use the ipcs shell command to see your shared memory segments.

« previous php.notes (#214620) next »