Process forking and monitoring for mere mortals
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
CHANGELOG
LICENSE
Manifest
README
Rakefile
daemonizr.rb

README

= Daemonizr - Process forking and monitoring for mere mortals

An example is worth a thousand words...

d = Daemonizr.new("Daemonizr")
d.start_cluster("MyServer", 3, lambda {loop{ sleep 2; File.open("/tmp/daemonizr.log", "a") { |f| f.puts "#{Process.pid}: #{Time.now}" }  }})
d.monitor_cluster! # Will hang here until the process is terminated with SIGTERM (kill 5). If a fork dies, it will be restarted.