In Files

  • webrick/server.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

WEBrick::Daemon

Public Class Methods

start() click to toggle source
 
               # File webrick/server.rb, line 27
def Daemon.start
  exit!(0) if fork
  Process::setsid
  exit!(0) if fork
  Dir::chdir("/")
  File::umask(0)
  STDIN.reopen("/dev/null")
  STDOUT.reopen("/dev/null", "w")
  STDERR.reopen("/dev/null", "w")
  yield if block_given?
end