[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: system? exec? fork? thread? Help managing external process

Bill Kelly

1/14/2005 12:06:00 AM

Hi,

From: "McMahon, Chris" <chris.mcmahon@verint.com>
> I'm new to Ruby and I need some help with managing an external
> process. I'm on Windows, and I want to do something (overly simplified)
> like this:
>
> File.new(file_to_be_handled_by_outside_process.txt)
> system ("C:\\filewatcher.exe file_to_be_handled_by_outside_process.txt")
> <write stuff to file_to_be_handled_by_outside_process.txt>
>
> The foreign process started by system() never stops. I need to
> return control to the Ruby script after the system() call so that I can
> have the Ruby script generate information for the foreign process to
> handle.

Might be able to do it with "start", like:

system ("start C:\\filewatcher.exe file_to_be_handled_by_outside_process.txt")


Hope this helps,

Regards,

Bill