Project

General

Profile

Misc #12937 ยป 0001-webrick-server-simplify-Daemon.start.patch

normalperson (Eric Wong), 11/14/2016 09:00 PM

View differences:

lib/webrick/server.rb
# block, if given.
def Daemon.start
exit!(0) if fork
Process::setsid
exit!(0) if fork
Dir::chdir("/")
File::umask(0)
STDIN.reopen(IO::NULL)
STDOUT.reopen(IO::NULL, "w")
STDERR.reopen(IO::NULL, "w")
Process.daemon
File.umask(0)
yield if block_given?
end
end
-
    (1-1/1)