title: Daemons do not get restarted?
body: <p>I am trying to run the same script in multiple daemons.</p>
  
  <p><code>myapp.rb</code> looks like this:</p>
  
  <pre><code>loop do
    sleep 5
    1 / 0 # crash it
  end
  </code></pre>
  
  <p>my <code>myapp_controller.rb</code>:</p>
  
  <pre><code>require 'rubygems'
  require 'daemons'
  
  options = {
    :log_output  =&gt; true,
    :backtrace   =&gt; true,
    :monitor     =&gt; true,
    :multiple    =&gt; true,
    :log_dir     =&gt; '/mnt/log/',
    :hard_exit   =&gt; true
  }
  Daemons.run(File.join(File.dirname(__FILE__), 'myapp.rb'), options)
  </code></pre>
  
  <p>When I run <code>ruby myapp_controller.rb start</code> several times in a row, it creates that many daemons, as I expect. But, after a while, due to an error in <code>myapp.rb</code> the daemons crash and the monitor restarts just one and not all. So I end up with a single running daemon.</p>
  
  <p>Why? What am I doing wrong?</p>