Emits the given signal via the XView dispatch instance with the
        given arguments.
        
        :param      signal | <str>
                    args   | <tuple>
16118
def dispatchEmit(self, signal, *args):
        
        XView.setGlobal('emitGroup', self.viewingGroup())
        XView.dispatch().emit(signal, *args)
856776
def send(self, signal, **kwargs):
        
        return self.__app.signals.send(signal, plugin=self._plugin, **kwargs)
904456
def signal(sig)
      sig = sig.to_i if sig.to_i != 0
      applog(self, :info, "#{self.name} sending signal '#{sig}' to pid #{self.pid}")
      ::Process.kill(sig, self.pid) rescue nil
    end
1121601
def emit(self, signal, message='__nomessagetoken__'):
        
        # call pre-emit hooks
        if signal == 'log':
            self.log_backend.info(message)
        elif signal == 'warn':
            self.log_backend.warn(message)
        elif signal == 'error':
            self.log_backend.error(message)

        return self.emit_to_frontend(signal, message)
1006527
def send_signal(signal, request, user, **kwargs):
    '''
    '''
    params = {
        'user_ip': request.remote_addr
    }
    params.update(kwargs)
    if user.is_authenticated:
        params['uid'] = user.id
    signal.send(request.url, **params)
1288782
def send_signal(self, request, response, forum):
        
        self.view_signal.send(
            sender=self, forum=forum, user=request.user, request=request, response=response,
        )
438053
def _connect_signals(self, model):
        
        for signal in self._signals:
            receiver = self._signals[signal]
            signal.connect(receiver, sender=model, dispatch_uid=self._dispatch_uid(signal, model))
830599
def signal(signal=None):
    '''
    
    '''
    valid_signals = {'forcestop': 'stop -force',
                     'securestart': 'start -security',
                     'start': 'start',
                     'stop': 'stop'}

    if signal not in valid_signals:
        return

    cmd = '{0}/bin/catalina.sh {1}'.format(
        __catalina_home(), valid_signals[signal]
    )
    __salt__['cmd.run'](cmd)
171744
def signal_handler(self, *args):
        
        self.user_callback(self.signal, self.user_arg, *args)
879237
def fire(self, args, kwargs):
        
        for info in self._listeners[:]:
            if info.pass_signal:
                info.listener(*args, signal=self, **kwargs)
            else:
                info.listener(*args, **kwargs)
841295
def signal_handler(sig, frame):
    
    for client in connected_clients[:]:
        if client.is_asyncio_based():
            client.start_background_task(client.disconnect, abort=True)
        else:
            client.disconnect(abort=True)
    return original_signal_handler(sig, frame)
774145
def signal_wrapper(f):
    """"""
    @wraps(f)
    def wrapper(*args, **kwds):
        args = map(convert, args)
        kwds = {convert(k): convert(v) for k, v in kwds.items()}
        return f(*args, **kwds)
    return wrapper
1088358
def signal(signal=None):
    '''
    
    '''
    no_extra_args = ('configtest', 'status', 'fullstatus')
    valid_signals = ('start', 'stop', 'restart', 'graceful', 'graceful-stop')

    if signal not in valid_signals and signal not in no_extra_args:
        return
    # Make sure you use the right arguments
    if signal in valid_signals:
        arguments = ' -k {0}'.format(signal)
    else:
        arguments = ' {0}'.format(signal)
    cmd = _detect_os() + arguments
    out = __salt__['cmd.run_all'](cmd)

    # A non-zero return code means fail
    if out['retcode'] and out['stderr']:
        ret = out['stderr'].strip()
    # 'apachectl configtest' returns 'Syntax OK' to stderr
    elif out['stderr']:
        ret = out['stderr'].strip()
    elif out['stdout']:
        ret = out['stdout'].strip()
    # No output for something like: apachectl graceful
    else:
        ret = 'Command: "{0}" completed successfully!'.format(cmd)
    return ret
229218
def connect(self, signal, **kwargs):
        """"""
        signal.connect(self, **kwargs)
        self.connections.append((signal, kwargs))
94125
def emit(*args)
      if args.size != @arity
        fail ::ArgumentError ,"wrong number of arguments for signal (#{args.size} for #{@arity})"
      end
      @listeners.each do |listener|
        listener.call(*args)
      end
    end
131743
def fire(obj, name, *args, **kwargs):
    
    signals = vars(obj).get('_signals', {})
    for func in signals.get(name, ()):
        func(*args, **kwargs)
979089
def set_signal_handler(self, sigs=None):
        
        if sigs is None:
            sigs = (signal.SIGTERM, signal.SIGINT, signal.SIGUSR1, signal.SIGUSR2, signal.SIGHUP)

        func = self.manage_signal
        if os.name == "nt":  # pragma: no cover, no Windows implementation currently
            try:
                import win32api
                win32api.SetConsoleCtrlHandler(func, True)
            except ImportError:
                version = ".".join([str(i) for i in os.sys.version_info[:2]])
                raise Exception("pywin32 not installed for Python " + version)
        else:
            for sig in sigs:
                signal.signal(sig, func)