note 43309 added to function.ftok
| From: | abk at avatartechnology dot com | Date: | Thu, 17 Jun 2004 05:17:22 +0000 |
| Subject: | note 43309 added to function.ftok | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71189@lists.php.net to get a copy of this message | ||
Thanks to daniele_dll@yahoo.it who got this in turn from linux glibc 2.3.2: http://www.php.net/manual/en/function.shmop-open.php
-- I'm putting this here because it might be helpful to others.
function ftok($pathname, $proj_id) {
$st = @stat($pathname);
if (!$st) {
return -1;
}
$key = sprintf("%u", (($st['ino'] & 0xffff) | (($st['dev']
& 0xff) << 16) | (($proj_id & 0xff) << 24)));
return $key;
}
----
Manual Page -- http://www.php.net/manual/en/function.ftok.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43309
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43309&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43309&report=yes
Search -- http://master.php.net/manage/user-notes.php