Receive the given $signal and react on it.

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

        $this->indexSubtree($signal->locationId);
    }
760872
public function handleSignal($signal)
    {
        switch ($signal) {
        case SIGINT:
            $this->log(
                'Received SIGINT, shutting down.' . PHP_EOL,
                Net_Notifier_Logger::VERBOSITY_ALL
            );
            $this->moribund = true;
            break;

        case SIGTERM:
            $this->log(
                'Received SIGTERM, shutting down.' . PHP_EOL,
                Net_Notifier_Logger::VERBOSITY_ALL
            );
            $this->moribund = true;
            break;
        }
    }
1315009
public function sendSignal(int $signal) {
        $runningPid = $this->lock->getRunningPID();
        if (!$runningPid) {
            return false;
        }

        // Send signal
        return posix_kill($runningPid, $signal);
    }
552268
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ObjectStateService\DeleteObjectStateSignal) {
            return;
        }

        parent::receive($signal);
    }
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];
  }
920459
protected function stop_children($signal=SIGTERM) {
        $this->log("Stopping children", GearmanManager::LOG_LEVEL_PROC_INFO);

        foreach ($this->children as $pid=>$child) {
            $this->log("Stopping child $pid (".implode(",", $child['job']).")", GearmanManager::LOG_LEVEL_PROC_INFO);
            posix_kill($pid, $signal);
        }

    }
851163
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\SectionService\AssignSectionSignal) {
            return;
        }// @todo Error Logging? No exception seem to be defined for this case

        $this->runLegacyKernelCallback(
            static function () use ($signal) {
                eZContentCacheManager::clearContentCacheIfNeeded($signal->contentId);
                eZSearch::updateObjectsSection([$signal->contentId], $signal->sectionId);
                eZContentObject::clearCache(); // Clear all object memory cache to free memory
            }
        );
    }
1090935
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\ObjectStateService\CreateObjectStateGroupSignal) {
            return;
        }

        parent::receive($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);
    }
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.");
		}
	}
96017
public function stop($signal = null)
    {
        if (!$this->running) {
            return;
        }

        if (null !== $signal) {
            $this->getLogger()->info('Stop called because of signal #'.$signal.'. Current state: '.$this->worker->getState().'.');
        } else {
            $this->getLogger()->info('Stop called: '.$this->worker->getState().'.');
        }

        $this->running = false;
        $this->worker->shutdown();
    }
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.");
        }
    }
281360
public function receive(Signal $signal)
    {
        if (!$signal instanceof Signal\LocationService\DeleteLocationSignal) {
            return;
        }

        $this->searchHandler->deleteLocation(
            $signal->locationId,
            $signal->contentId
        );
    }
1050083
public function dispatch($signal, ...$arguments): Promise
    {
        if (\is_object($signal)) {
            \array_unshift($arguments, $signal);

            $signal = \get_class($signal);
        }

        return $this->call($this->handlers->get($signal), $arguments);
    }
583521
protected function sendSignal($signal)
    {
        try {
            $this->process->signal($signal);
        } catch (ExceptionInterface $e) {
            if ($this->process->isRunning()) {
                throw $e;
            }
        }
    }
1195771
public function install(array $signals)
    {
        if (self::isSupported()) {
            $callback = [$this, 'dispatchSignal'];
            foreach ($signals as $signal) {
                \pcntl_signal($signal, $callback);
            }
        };
    }
1106210
public function broadcast($signal) {
        if ($signal == SIGINT || $signal == SIGKILL) {
            $this->isStopped = true;
        }
        foreach ($this->handlers as $handler) {
            posix_kill($handler, $signal);
        }
    }