[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Question on exec subprocesses

Wilson Bilkovich

9/28/2006 11:46:00 PM

On 9/28/06, Phy Prabab <phyprabab@yahoo.com> wrote:
> Folks,
>
> Can someone shed some light on how I can accomplish something similar to this:
>
> exec("foo action")
> exec("foobar action")
> Process.wait
>
> I want to wait on the second process, yet in ruby 184, all processes are waited on (until completion). How can I effectively fork off these process simultaneously and wait for the last one to complete or what would be really nice, is to wait for both of these separate processes to finish.
>

Does:
fork {exec "foo action"}
fork {exec "foobar action"}
Process.waitall

do what you want?