title: Strange behavior with Kernel.spawn and rails in application.rb
body: <p>If I add the following lines in <code>application.rb</code></p>
  
  <pre><code>puts 'in application.rb'
  pid = spawn('rake jobs:work')
  Process.detach pid
  </code></pre>
  
  <p>I see the following output</p>
  
  <pre><code>in application.rb
  =&gt; Booting Puma
  ...
  * Listening on tcp://0.0.0.0:3000
  Use Ctrl-C to stop
  in application.rb
  [Worker(host:local pid:9966)] Starting job worker
  in application.rb
  [Worker(host:local pid:9998)] Starting job worker
  in application.rb
  [Worker(host:local pid:10032)] Starting job worker
  </code></pre>
  
  <p>If I remove the <code>spawn</code> call <code>in application.rb</code> is displayed only once at the beginning, as expected.</p>
  
  <p>This output is written at about once per second. All those processes are healthy and will be stoped when I killed puma.</p>
  
  <p>I can't figure out what is happening. Why is this code getting executed every second? </p>