Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

shm_remove

(PHP 3 >= 3.0.6, PHP 4, PHP 5)

shm_remove -- Removes shared memory from Unix systems

Description

bool shm_remove ( int shm_identifier )

shm_remove() removes the shared memory shm_identifier. All data will be destroyed.

See also shm_remove_var().



add a note add a note User Contributed Notes
shm_remove
aaron DURP segura DURP gmail DURP com
19-Aug-2006 04:55
It appears that you must be connected to the shm segment in order to remove it.

<?php
shm_remove
($shm);
shm_detach($shm);
?>

works, while

<?php
shm_detach
($shm);
shm_remove($shm);
?>

produces "Warning: shm_remove(): The parameter is not a valid shm_identifier ..."
cu at ulakbim dot gov dot tr
29-Dec-1999 08:30
Though it says **shm_identifier** in
<PRE>
  int shm_remove(int shm_identifier);
</PRE>
and
<PRE>
  shm_attach() returns an **id** that that can be used to access the System V...
</PRE>
a snippet like this:
<PRE>
  $key = 1234;
  $shm=shm_attach($key);
  // do whatever...
  shm_remove($shm);
</PRE>
produces an error like
Warning: 2(which is the value of $shm) is not a existing SysV shared memory key in /usr/cu/web/sema.php on line 44...
The documentation confused me a bit. I thought shm_remove would get the shm handle/id that returns from shm_attach, not the key given to shm_attach. So, use instead:
<PRE>
  shm_remove($key);
</PRE>
which is what is intended indeed.

SESAM> <shm_remove_var
Last updated: Fri, 26 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571