title: Cucumber hangs after all scenarios passed
body: <p>I have jRuby on Rails application with some cucumber tests.</p>
  
  <p>Problem is that <code>cucumber features</code> hangs after executing all steps until I press ctrl+c. Interesting that it only happens if all of the tests pass.</p>
  
  <pre><code>10 scenarios (10 passed)
  116 steps (116 passed)
  13m59.058s
  -&gt; hangs here
  </code></pre>
  
  <p>I've tried adding global <code>at_exit</code> hook, it is being executed and than command freezes.</p>
  
  <p>Here is my <code>bundle list</code> <a href="https://gist.github.com/37f2448055071bbbc636" rel="nofollow">https://gist.github.com/37f2448055071bbbc636</a></p>
  
  <p>My temporary solution is to add <code>at_exit</code> hook like this</p>
  
  <pre><code>at_exit do 
    exit! !($!.nil? || $!.is_a?(SystemExit) &amp;&amp; $!.success?)
  end
  </code></pre>
  
  <p>Some connections may be left opened, data not cleaned, etc. but it will at least exit with correct status code, which is used by CI server.</p>