[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: system, `` or exec on Windows?

Chris Morris

7/15/2003 1:05:00 PM

Ronald Pijnacker wrote:

>What is the easiest (or any) way to do the following with Ruby on
>Windows:
>
>- execute a child process
>- get the output written to stdout and stderr (as with `<command>`)
>- also get the exit code ($?)
>- in a thread safe way
>
>
Can't answer all your questions, but I'll share what I got.

First, see http://ruby-talk... for some replacement methods for
`` and system, if you're unable to get the originals to work on Windows.
Downside as this post mentions (http://ruby-talk.com/b...) is
that $? is then not set. It also doesn't help you with stderr, although
there was a recent thread with making a popen3 for Windows, dunno what
the latest on that is. And thread-safe - dunno either.

--

Chris
http://clabs....
-=-=-=-=-=-=-=-=-=-=-=-=-=-
Free solo piano album (mp3)
http://cministries.org/cstudios/blackan...