Exemplo n.º 1
0
 protected function terminateLoadManager()
 {
     $this->logger->info('Try to terminate LM.');
     try {
         /**
          * @var PidDto $lmPidDto
          */
         $lmPidDto = $this->commandsManager->getPidByPpid($this->loadManagerProcess->getPid());
         $this->trySendSigTerm($lmPidDto->getPid());
     } catch (\Exception $e) {
         $this->logger->debug(LoggingExceptions::getExceptionString($e));
     }
     $this->tryTerminateProcess($this->loadManagerProcess);
     return null;
 }
Exemplo n.º 2
0
 /**
  * @return null
  * @throws \CommandsExecutor\Inventory\Exceptions\CommandsExecutionException
  */
 protected function stopReplyStack()
 {
     LinuxCommands::sendSigTermOrKill($this->commandsManager->getPidByPpid($this->replyStackProcess->getPid())->getPid());
     LinuxCommands::tryTerminateProcess($this->replyStackProcess);
     return null;
 }