Method: Qs::Process#initialize

Defined in:
lib/qs/process.rb

#initialize(daemon, options = nil) ⇒ Process

Returns a new instance of Process.



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/qs/process.rb', line 17

def initialize(daemon, options = nil)
  options ||= {}
  @daemon = daemon
  @name   = "qs: #{@daemon.process_label}"
  @logger = @daemon.logger

  @pid_file    = PIDFile.new(@daemon.pid_file)
  @signal_io   = IOPipe.new
  @restart_cmd = RestartCmd.new

  skip_daemonize = ignore_if_blank(ENV['QS_SKIP_DAEMONIZE'])
  @daemonize = !!options[:daemonize] && !skip_daemonize
end