Exemplo n.º 1
0
 /**
  * send signal to master process
  *
  * @return  void
  */
 public function sendSignalToMaster($sig = SIGTERM)
 {
     $this->log->info('----> sending signal to master. signal: ' . $sig);
     posix_kill($this->masterPid, $sig);
     $this->log->info('<---- sent signal.');
     $status = null;
     $this->pcntl->waitpid($this->masterPid, $status);
     $this->log->info('. status: ' . $status);
     $this->masterPid = null;
 }
Exemplo n.º 2
0
 /**
  * @param   int     $sig
  * @return  void
  */
 public function terminate($sig)
 {
     posix_kill($this->fork->getPid(), $sig);
     $status = null;
     $this->pcntl->waitpid($this->fork->getPid(), $status);
 }