when sleep used on a spawned process it kills the process
<p>I am primarily a java guy tinkering with Process.spawn and have hit a bit of a wall. Basically I tossed together a few rspec classes that do puts to tinker with it. This worked pretty well. Then I tossed a sleep in and the whole process just dies when a sleep is reached. I am not sure why, I thought that spawning gets around the shared resource issues of threads. Below is what I was using to make the processes</p>

<pre><code>test_files = Dir["../spec/*.rb"]
test_files.each do |file|
  pid = Process.spawn("rspec #{file}")
  p pid
end
Process.wait
</code></pre>

<p>There is very little going on with the tests in the spec, below is a sample one.</p>

<pre><code>it 'should another thing' do
 sleep(0.3)
 p "another1"
end
</code></pre>

<p>Could someone be so kind as to explain where I am going wrong?</p>