title: How to run code in a separate process?
body: <p>I'm looking for a solution to spawn code defined in a block or Proc in a separate process.
  Something like</p>
  
  <pre><code>p = Proc.new do
    File.open('newproc.log', 'w') {
      |fw|
      10.times do
        fw.puts Time.now
        sleep 1
      end
    }
  end
  
  # spawn p in a separate process here
  
  # original code continues
  </code></pre>
  
  <p>No process forking, no threading, no storing in an external file. Just executing the block in a standalone process.</p>
  
  <p>Any idea ?</p>
  
  <p><strong>Update:</strong>
  I've to add the block does not depend on anything defined in the calling process.</p>