title: How to retrieve exit status from ruby Open3.popen3()?
body: <p>I seem to be stuck trying to retrieve the exit status of a shell command which was started from ruby's Open3.popen3()-method.  </p>
  
  <p>Here's my code:</p>
  
  <pre><code>require 'open3'
  stdin, stdout, stderr = Open3.popen3('ls')
  </code></pre>
  
  <p>When I now try to access <code>$?</code> it still is <code>nil</code> </p>
  
  <p>Is it possible to retrieve the exit status after all?</p>
  
  <p>Notes:<br>
  - <code>ls</code> is not the command I'm trying to use in my script. I just used this to give an example. My script is a bit more complex and contains user input, which is why I need the sanitizing functionality of Open3.<br>
  - I've also tried the block variant of popen3, but didn't succeed with that either.</p>