Registers the process signal listeners
502319
protected function register_ticks($parent=true) {

        if ($parent) {
            $this->log("Registering signals for parent", GearmanManager::LOG_LEVEL_DEBUG);
            pcntl_signal(SIGTERM, array($this, "signal"));
            pcntl_signal(SIGINT,  array($this, "signal"));
            pcntl_signal(SIGUSR1,  array($this, "signal"));
            pcntl_signal(SIGUSR2,  array($this, "signal"));
            pcntl_signal(SIGCONT,  array($this, "signal"));
            pcntl_signal(SIGHUP,  array($this, "signal"));
        } else {
            $this->log("Registering signals for child", GearmanManager::LOG_LEVEL_DEBUG);
            $res = pcntl_signal(SIGTERM, array($this, "signal"));
            if (!$res) {
                exit();
            }
        }
    }
398381
def register_signals(self, app):
        """"""
        before_record_index.connect(inject_provisional_community)
        if app.config['COMMUNITIES_OAI_ENABLED']:
            listen(Community, 'after_insert', create_oaipmh_set)
            listen(Community, 'after_delete', destroy_oaipmh_set)
        inclusion_request_created.connect(new_request)
1107373
public void registerMonitor(final Graph.Monitor monitor) {
        if (uiThreadRunner.isOnUiThread()) {
            graph.registerMonitor(monitor);
        } else {
            uiThreadRunner.post(new Runnable() {
                @Override
                public void run() {
                    graph.registerMonitor(monitor);
                }
            });
        }
    }
1130067
public function registerEvents()
    {
        $job = & $this->job;

        Event::listen(Event::JOB_PERFORM, function ($event, $_job) use (&$job) {
            $job = $_job;
        });
    }
987712
def register(self, event, callable, priority=10):
        """"""
        logger.debug('registered: ' + event + ': ' + repr(callable) + ' [' + repr(self) + ']')
        return EventReceiver(event, callable, manager=self, priority=priority)
883308
def register():
    ''''''
    for sig_name in _SIGNAL_HANDLERS_DB.keys():
        if not hasattr(signals, sig_name):
            _LOGGER.error((
                'The i18n_subsites plugin requires the {} '
                'signal available for sure in Pelican 3.4.0 and later, '
                'plugin will not be used.').format(sig_name))
            return

    for sig_name, handler in _SIGNAL_HANDLERS_DB.items():
        sig = getattr(signals, sig_name)
        sig.connect(handler)
754485
protected function registerSignals()
    {
        foreach (self::$signals as $no => $name) {
            if (($name === 'SIGKILL') || ($name == 'SIGSTOP')) {
                continue;
            }

            if (!\pcntl_signal($no, [$this, 'sighandler'], true)) {
                $this->log('Cannot assign ' . $name . ' signal');
            }
        }
    }
860811
private static synchronized void registerListener() {

        if (!m_listenerRegistered) {
            OpenCms.getEventManager().addCmsEventListener(
                new CmsIconUtil(),
                new int[] {I_CmsEventListener.EVENT_CLEAR_CACHES});
            m_listenerRegistered = true;
        }
    }
386254
protected function registerSignalHandlers(): bool
    {
        if (!function_exists('pcntl_signal')) {
            $this->log->warning('Signal Handling is not supported on this system');

            return false;
        }

        pcntl_async_signals(true);

        pcntl_signal(SIGTERM, [$this, 'shutdownNow']);
        pcntl_signal(SIGINT, [$this, 'shutdownNow']);
        pcntl_signal(SIGQUIT, [$this, 'shutdown']);
        pcntl_signal(SIGUSR1, [$this, 'killChild']);
        pcntl_signal(SIGUSR2, [$this, 'pauseProcessing']);
        pcntl_signal(SIGCONT, [$this, 'continueProcessing']);

        $this->log->debug('Registered Signals');

        return true;
    }
108082
def register_callback(self):
        """"""

        cid = str(self.__cid)
        self.__cid += 1
        event = queue.Queue()
        self.__callbacks[cid] = event
        return cid, event
702698
def register_callback(self, sensorid, callback, user_data=None):
        """"""
        if sensorid not in self._registry:
            self._registry[sensorid] = list()
        self._registry[sensorid].append((callback, user_data))
1374475
private function registerEvents()
    {
        foreach ($this->getSetting('events', []) as $event => $listeners) {
            foreach ($listeners as $listener) {
                Event::bind($event, $listener);
            }
        }
    }
509883
def register_signal(alias: str, signal: pyqtSignal):
        
        if SignalDispatcher.signal_alias_exists(alias):
            raise SignalDispatcherError('Alias "' + alias + '" for signal already exists!')

        SignalDispatcher.signals[alias] = signal
715531
def register():
    """"""
    signals.initialized.connect(initialized)
    try:
        signals.content_object_init.connect(detect_content)
        signals.all_generators_finalized.connect(detect_images_and_galleries)
        signals.article_writer_finalized.connect(resize_photos)
    except Exception as e:
        logger.exception('Plugin failed to execute: {}'.format(pprint.pformat(e)))
839913
@Override
    public boolean registerMonitor(Object monitor) {
        // Process the annotated object, build a configuration, and create probe
        // listeners that represent each call site of the monitor.
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "monitor = " + monitor);
        }
        long startTime = System.nanoTime();
        Set<ProbeListener> listeners = buildListenersFromAnnotated(monitor);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "buildListenersFromAnnotated time = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        // Update collections of listeners
        startTime = System.nanoTime();
        if (!addListenersForMonitor(monitor, listeners)) {
            return false;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "addListenersForMonitorTime = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        // Process all of the listeners and determine which of the available
        // classes needs to be transformed
        startTime = System.nanoTime();
        Collection<Class<?>> effectedClasses = processNewListeners(listeners);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "processNewListeners time = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        // Update the classes with the configured probes
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "effectedClasses.size() = " + effectedClasses.size());
        }
        startTime = System.nanoTime();
        this.transformer.instrumentWithProbes(effectedClasses);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "instrumentWithProbes time = " + TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - startTime) + "usec");
        }

        return true;
    }
1335308
private function registerListeners(): void
    {
        Event::listen(ReactionHasBeenAdded::class, IncrementAggregates::class);
        Event::listen(ReactionHasBeenRemoved::class, DecrementAggregates::class);
    }
749140
private void registerListeners() {
    protocol.registerExecuteHandler(this::execute);
    protocol.registerBackupHandler(this::backup);
    protocol.registerRestoreHandler(this::restore);
    protocol.registerCloseHandler(this::close);
    protocol.registerMetadataHandler(this::metadata);
  }