IO.popen() and system() in Ruby is sorely lacking several useful features, such as:
- obtaining the return value of the function
- capturing both stdout and stderr (seperately and merged)
- running without spawning an extra cmd.exe or /bin/sh process
Python has a module "subprocess" which I was thinking about using as inspiration for a similar module in Ruby. Now to the questions:
- How are Ruby-programmers working around the issues above, for example obtaining the return value when doing a popen() call?
- Is this something which has already been implemented?