note 32851 deleted from ref.shmop by spic
| From: | spic@php.net | Date: | Mon, 09 Jun 2003 10:16:38 +0000 |
| Subject: | note 32851 deleted from ref.shmop by spic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50016@lists.php.net to get a copy of this message | ||
Note Submitter: Ondrej
----
<?php
$shm_key = ftok(__FILE__,'t');
$shm_id = @shmop_open($shm_key, "n", 0644, 1024);
if($shm_id == false) {
$shm_id = shmop_open($shm_key, "w", 0, 0);
list($count) = sscanf(shmop_read($shm_id, 0, 1024), '%d');
} else {
$count = 1;
}
printf('0x%x: %d<br />', $shm_key, $count++);
shmop_write($shm_id, sprintf('%d', $count), 0);
?>
When I'm save (not modify) this file new shared memory is sometimes created:
before save:
0x7405b292 190382128 apache 644 1024 0
after save:
0x7405b292 190382128 apache 644 1024 0
0x7405b291 193691697 apache 644 1024 0
Where is problem?