aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick/server.rb')
-rw-r--r--lib/webrick/server.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb
index c4d23bd67b..30f4dc3143 100644
--- a/lib/webrick/server.rb
+++ b/lib/webrick/server.rb
@@ -23,7 +23,15 @@ module WEBrick
end
end
+ ##
+ # A generic module for daemonizing a process
+
class Daemon
+
+ ##
+ # Performs the standard operations for daemonizing a process. Runs a
+ # block, if given.
+
def Daemon.start
exit!(0) if fork
Process::setsid