public function onShutdown()
	{
		if (posix_getpid() == $this->_nParentPid) {
			$this->_log('INFO: Parent shutdown, cleaning memory...');
			@shm_remove($this->_hShm) && @shm_detach($this->_hShm);
			@sem_remove($this->_hSem);
		}
	}
public function onShutdown()
	{
		if (posix_getpid() == $this->_nParentPid) {
			$this->_log('INFO: Parent shutdown, cleaning memory...');
			@shm_remove($this->_hShm) && @shm_detach($this->_hShm);
			@sem_remove($this->_hSem);
		}
	}
public function onShutdown ( ) { if ( posix_getpid ( ) == $ this -> _nParentPid ) { $ this -> _log ( 'INFO: Parent shutdown, cleaning memory...' ) ; @ shm_remove ( $ this -> _hShm ) && @ shm_detach ( $ this -> _hShm ) ; @ sem_remove ( $ this -> _hSem ) ; } }
When the parent process exits, cleans shared memory and semaphore.

This is called using 'register_shutdown_function' pattern.
@see http://php.net/register_shutdown_function
When the parent process exits cleans shared memory and semaphore .