[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Will a "system call" wait until the command finishes?

sayoyo Sayoyo

2/15/2008 8:45:00 PM

Hi,

I wish to know, if I use system() to execute a time consuming task, will
ruby wait until the task is finished or it will automatically interprete
the next line?

Thanks you very much

sayoyo
--
Posted via http://www.ruby-....

1 Answer

Reacher

2/15/2008 8:48:00 PM

0

On Feb 15, 2:44 pm, sayoyo Sayoyo <say...@yahoo.com> wrote:
> Hi,
>
> I wish to know, if I use system() to execute a time consuming task, will
> ruby wait until the task is finished or it will automatically interprete
> the next line?
>
> Thanks you very much
>
> sayoyo
> --
> Posted viahttp://www.ruby-....

it appears that Ruby will wait. try this
$ ruby -e 'system("sleep 5");p "hi"'