Receive the given $signal and react on it.

@param \eZ\Publish\Core\SignalSlot\Signal $signal
421489
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentService\CopyContentSignal) {
            return;
        }

        $this->searchHandler->indexContent(
            $this->persistenceHandler->contentHandler()->load(
                $signal->dstContentId,
                $signal->dstVersionNo
            )
        );

        $locations = $this->persistenceHandler->locationHandler()->loadLocationsByContent(
            $signal->dstContentId
        );
        foreach ($locations as $location) {
            $this->searchHandler->indexLocation($location);
        }
    }
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);
        }
    }
1374983
public function shutdown($signal = SIGTERM)
    {
        foreach ($this->processes as $process) {
            if ($process->isRunning()) {
                $process->shutdown(true, $signal);
            }
        }
    }
886834
public function kill($signal = SIGKILL)
    {
        if (!$this->getPid()) {
            throw new ResqueRuntimeException(
                'Cannot kill a process with out a pid set'
            );
        }

        //TODO: needs logger
        //$this->getLogger()->notice('Sending {signal} to process {pid}', array('signal'=>$signal, 'pid'=>$this->getPid()));

        // @todo Work out if I care to check the result, and if I did what to do about it... Exception?
        posix_kill($this->getPid(), $signal);

        $this->pid = null;

        return $this;
    }
152729
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentTypeService\PublishContentTypeDraftSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () use ($signal) {
                eZExpiryHandler::registerShutdownFunction();
                $handler = eZExpiryHandler::instance();
                $time = time();
                $handler->setTimestamp('user-class-cache', $time);
                $handler->setTimestamp('class-identifier-cache', $time);
                $handler->setTimestamp('sort-key-cache', $time);
                $handler->store();
            }
        );
    }
1315009
public function sendSignal(int $signal) {
        $runningPid = $this->lock->getRunningPID();
        if (!$runningPid) {
            return false;
        }

        // Send signal
        return posix_kill($runningPid, $signal);
    }
936110
public void handleSignal(Signal signal) {

        switch (signal) {
            case publish:
                signalPublish();
                break;
            case unpublish:
                signalUnpublish();
                break;
            case remove:
                signalRemove();
                break;
            case unremove:
                signalUnremove();
                break;
            default:
                break;
        }
        m_handler.update(m_id, this);
    }
1354196
public static function signal($signals, $callback)
    {
        foreach ($signals as $signal) {
            if (is_null($callback)) {
                \Swoole\Process::signal($signal, null);
                continue;
            }
            \Swoole\Process::signal($signal, function ($signal) use ($callback) {
                try {
                    call_user_func($callback, $signal);
                } catch (\Throwable $e) {
                    \Mix::$app->error->handleException($e);
                }
            });
        }
    }
889907
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\UserService\DeleteUserGroupSignal) {
            return;
        }

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

        // Delete locations if there is any
        foreach ($signal->affectedLocationIds as $locationId) {
            $this->searchHandler->deleteLocation($locationId, $signal->userGroupId);
        }
    }
232673
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LocationService\CreateLocationSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () use ($signal) {
                eZContentCacheManager::clearContentCacheIfNeeded($signal->contentId, true, [$signal->locationId]);
                $object = eZContentObject::fetch($signal->contentId);
                eZSearch::addNodeAssignment($object->mainNodeID(), $signal->contentId, $signal->locationId);
                eZContentObject::clearCache(); // Clear all object memory cache to free memory
            }
        );
    }
1087090
public static function signalHandler($signal)
    {
        switch ($signal) {
            // Stop.
            case SIGINT:
                static::$_gracefulStop = false;
                static::stopAll();
                break;
            // Graceful stop.
            case SIGTERM:
                static::$_gracefulStop = true;
                static::stopAll();
                break;
            // Reload.
            case SIGQUIT:
            case SIGUSR1:
                if($signal === SIGQUIT){
                    static::$_gracefulStop = true;
                }else{
                    static::$_gracefulStop = false;
                }
                static::$_pidsToRestart = static::getAllWorkerPids();
                static::reload();
                break;
            // Show status.
            case SIGUSR2:
                static::writeStatisticsToStatusFile();
                break;
            // Show connection status.
            case SIGIO:
                static::writeConnectionsStatisticsToStatusFile();
                break;
        }
    }
617107
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ContentService\PublishVersionSignal) {
            return;
        }

        $this->runLegacyKernelCallback(
            static function () use ($signal) {
                eZContentCacheManager::clearContentCacheIfNeeded($signal->contentId);
                eZContentOperationCollection::registerSearchObject($signal->contentId);
                eZContentObject::clearCache(); // Clear all object memory cache to free memory
            }
        );
    }
1018178
public void signal(Signal signal, CmsUUID id) {

        getStatus(id).handleSignal(signal);
        runSelectionChangeAction();
    }
198674
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LocationService\MoveSubtreeSignal) {
            return;
        }

        $this->indexSubtree($signal->locationId);
    }
540451
public function subscribe($signal, $callback)
  {
    if(empty($this->sigslots[$signal]))
    {
      $this->sigslots[$signal] = array();
    }

    $index = $this->getCallbackHash($callback);

    if(!array_key_exists($index, $this->sigslots[$signal]))
    {
      $this->sigslots[$signal][$index] = new TeamSpeak3_Helper_Signal_Handler($signal, $callback);
    }

    return $this->sigslots[$signal][$index];
  }
795824
public function emit(Signal $signal)
    {
        if ($this->transactionDepth === 0) {
            $this->signalDispatcher->emit($signal);
        } else {
            $this->signalsQueue[$this->transactionCount][] = $signal;
        }
    }
381970
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ObjectStateService\UpdateObjectStateGroupSignal) {
            return;
        }

        parent::receive($signal);
    }