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; }
/** * @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; }