diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/webrick/server.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index 0a8e722b44..9462e6cfb2 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -44,14 +44,8 @@ module WEBrick # 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 |