Receive the given $signal and react on it.

@param \eZ\Publish\Core\SignalSlot\Signal $signal
198674
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LocationService\MoveSubtreeSignal) {
            return;
        }

        $this->indexSubtree($signal->locationId);
    }
147430
public function kill($signal = SIGTERM)
    {
        if (!$this->isAlive()) {
            return false;
        }

        if (!proc_terminate($this->resource, $signal)) {
            return false;
        }

        $this->setStreamBlocking();

        while ($this->isAlive()) {
            usleep(50000);
        }

        $this->cleanup();
        return true;
    }
1191392
public function signalReceived($signal)
    {
        if ($signal === 'submit') {
            if (!$this->getPresenter()->getRequest()->hasFlag(Nette\Application\Request::RESTORED)) {
                $this->fireEvents();
            }
        } else {
            $class = get_class($this);
            throw new BadSignalException("Missing handler for signal '$signal' in $class.");
        }
    }
620195
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LanguageService\DisableLanguageSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () {
                eZContentLanguage::expireCache();
            }
        );
    }
686916
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LocationService\SwapLocationSignal) {
            return;
        }

        $contentInfoList = $this->persistenceHandler->contentHandler()->loadContentInfoList([$signal->content1Id, $signal->content2Id]);
        $this->searchHandler->indexContent(
            $this->persistenceHandler->contentHandler()->load(
                $signal->content1Id,
                $contentInfoList[$signal->content1Id]->currentVersionNo
            )
        );
        $this->searchHandler->indexContent(
            $this->persistenceHandler->contentHandler()->load(
                $signal->content2Id,
                $contentInfoList[$signal->content2Id]->currentVersionNo
            )
        );
        $this->searchHandler->indexLocation($this->persistenceHandler->locationHandler()->load($signal->location1Id));
        $this->searchHandler->indexLocation($this->persistenceHandler->locationHandler()->load($signal->location2Id));
    }
73733
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentService\DeleteContentSignal) {
            return;
        }

        // Delete Content
        $this->searchHandler->deleteContent($signal->contentId);

        // Delete locations if there is any
        foreach ($signal->affectedLocationIds as $locationId) {
            $this->searchHandler->deleteLocation($locationId, $signal->contentId);
        }
    }
672890
public function emit(Signal $signal)
    {
        $signalName = get_class($signal);
        if (!isset($this->signalSlotMap[$signalName])) {
            $this->signalSlotMap[$signalName] = array();
        }

        foreach (array_merge($this->signalSlotMap['*'], $this->signalSlotMap[$signalName]) as $slot) {
            /* @var \eZ\Publish\Core\SignalSlot\Slot $slot */
            $slot->receive($signal);
        }
    }
1204842
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ObjectStateService\SetContentStateSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () use ($signal) {
                eZContentCacheManager::clearContentCacheIfNeeded($signal->contentId);
                eZSearch::updateObjectState($signal->contentId, [$signal->objectStateId]);
                eZContentObject::clearCache(); // Clear all object memory cache to free memory
            }
        );
    }
1374983
public function shutdown($signal = SIGTERM)
    {
        foreach ($this->processes as $process) {
            if ($process->isRunning()) {
                $process->shutdown(true, $signal);
            }
        }
    }
71988
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LocationService\HideLocationSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () use ($signal) {
                $node = eZContentObjectTreeNode::fetch($signal->locationId);
                eZContentObjectTreeNode::clearViewCacheForSubtree($node);
                eZSearch::updateNodeVisibility($signal->locationId, 'hide');
                eZContentObject::clearCache(); // Clear all object memory cache to free memory
            }
        );
    }
984920
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\SectionService\AssignSectionSignal) {
            return;
        }

        $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($signal->contentId);
        $this->searchHandler->indexContent(
            $this->persistenceHandler->contentHandler()->load($contentInfo->id, $contentInfo->currentVersionNo)
        );
    }
547594
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentService\UpdateContentMetadataSignal) {
            return;
        }

        $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($signal->contentId);
        if (!$contentInfo->isPublished) {
            return;
        }
        $this->searchHandler->indexContent(
            $this->persistenceHandler->contentHandler()->load($contentInfo->id, $contentInfo->currentVersionNo)
        );
        $this->searchHandler->indexLocation($this->persistenceHandler->locationHandler()->load($contentInfo->mainLocationId));
    }
170169
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentService\CopyContentSignal) {
            return;
        }

        $this->client->updateContent($signal->dstContentId, $signal->dstVersionNo);
    }
720901
public function signalReceived($signal)
	{
		if (!$this->tryCall($this->formatSignalMethod($signal), $this->params)) {
			$class = get_class($this);
			throw new BadSignalException("There is no handler for signal '$signal' in class $class.");
		}
	}
341306
public function workerSignal(int $signal) {
        $this->log(LogLevel::DEBUG, "[{pid}] Caught signal '{$signal}' (SIGHUP) at worker - handing off to payload handler");

        switch ($signal) {

            // Daemon was asked to hang up
            case SIGHUP:
                $this->payloadExec('signal', [$signal]);
                break;

            // Custom signal - Nothing
            case SIGUSR1:
                $this->payloadExec('signal', [$signal]);
                break;

            // Custom signal - Nothing
            case SIGUSR2:
                $this->payloadExec('signal', [$signal]);
                break;
        }
    }
776670
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\UserService\UnAssignUserFromUserGroupSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () {
                eZContentCacheManager::clearAllContentCache();
                eZRole::expireCache();
            }
        );
    }
583521
protected function sendSignal($signal)
    {
        try {
            $this->process->signal($signal);
        } catch (ExceptionInterface $e) {
            if ($this->process->isRunning()) {
                throw $e;
            }
        }
    }