Methods

KQueue::Watcher::Signal

The {Watcher} subclass for events fired when a signal is received. Signal events are watched via {Queue#watch_for_signal}.

Attributes

name[R]

The name of the signal, e.g. “KILL” for SIGKILL.

@return [String]

number[R]

The number of the signal, e.g. 9 for SIGKILL.

@return [Fixnum]

Public Class Methods

new(queue, signal, callback) click to toggle source

Creates a new signal Watcher.

@private

# File lib/rb-kqueue/watcher/signal.rb, line 19
def initialize(queue, signal, callback)
  if signal.is_a?(String)
    @name = signal
    @number = Signal.list[signal]
  else
    @name = Signal.list.find {|_, n| n == signal}.first
    @number = signal
  end

  super(queue, @number, :signal, [], nil, callback)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.