spawner version 1.0.0
by Tim Pease
http://codeforpeople.rubyforge.org/spawner
== DESCRIPTION
Spawn multiple child processes from Ruby and re-spawn those processes if they die.
Spawner works on Mac OS X, Linux, Windows, Solaris, AIX -- anywhere that Ruby can run. It is useful for load testing other applications or just keeping things alive. The Spawner class allows the number of child processes to be changed dynamiclly so they can be brought up and down as needed without restarting the spawner.
There is also a handy command line spawner app that's really useful for load testing services -- spawn twenty clients and see how things hold up.
== CHANGES
* 1 major enhancement
* Birthday!
== SYNOPSIS
Start three 'foo' processes and re-spawn immediately when one dies.
spawner = Spawner.new( 'foo', :spawn => 3 )
spawner.start
Start two 'bar' processes, pause for 10 seconds before re-spawning, and capture output to a file.
spawner = Spawner.new( 'bar', :spawn = 2, :pause => 10, :stdout => 'stdout.txt' )
spawner.start
Start 10 'baz' process and kill off one process each minute until none are left running.
spawner = Spawner.new( 'baz', :spawn => 10 )
spawner.start
until (spawner.spawn == 0)
sleep 60
spawner.spawn -= 1
end
== INSTALL:
sudo gem install spawner
Blessings,
TwP