/** * @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; }
protected function getCommandExecutionResult(CommandsExecutionDto $commandsDto) { $commandResult = null; switch ($this->osType) { case CommandsConstants::LINUX: $commandResult = LinuxCommands::getCommandResult($commandsDto); break; default: throw new CommandsExecutionException('Unknown OS type.'); } return $commandResult; }