Esempio n. 1
0
 /**
  * Ini system param
  */
 public function init()
 {
     parent::init();
     ini_set('memory_limit', '-1');
     set_time_limit(0);
     error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
     $this->_logger = LoggerFactory::getFileLogger('TcpServerCommand');
     //        $this->_logger = LoggerFactory::getConsoleLogger();
     $this->_synchronization = new Synchronization();
     if (Synchronization::setTcpServerPid(getmypid())) {
         $this->_logger->log(__METHOD__ . ' ' . 'process can take pid = ' . getmypid());
     } else {
         $this->_logger->log(__METHOD__ . ' ' . 'process can not take pid.');
     }
     $this->_logger->log(__METHOD__ . ' ' . 'process can not take pid.');
 }