class Servolux::Daemon

def startup( do_exit = true )

Returns:
  • (Daemon) - self
def startup( do_exit = true )
  raise Error, "Fork is not supported in this Ruby environment." unless ::Servolux.fork?
  return if alive?
  logger.debug "About to fork ..."
  @piper = ::Servolux::Piper.daemon(nochdir, noclose)
  # Make sure we have an idea of the state of the log file BEFORE the child
  # gets a chance to write to it.
  @logfile_reader.updated? if @logfile_reader
  @piper.parent {
    @piper.timeout = 0.1
    wait_for_startup
    exit!(0) if do_exit
  }
  @piper.child { run_startup_command }
  self
end