I seem to be stuck trying to retrieve the exit status of a shell command which was started from ruby's Open3.popen3()-method.
Here's my code:
stdin, stdout, stderr = Open3.popen3('ls')
popen3 yields/returns four parameters,
wait_thr contains a method
wait_thr.value which returns the exit status of the command (in fact, it is a
Process::Status object according to documentation). Also have a look at http://www.ruby-doc.org/stdlib-1.9.3/libdoc/open3/rdoc/Open3.html#method-c-popen3