Group: comp.lang.ruby
From: Reacher
Date: Friday, February 15, 2008 2:47 PM
Subject: Re: Will a "system call" wait until the command finishes?

On Feb 15, 2:44=A0pm, sayoyo Sayoyo 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-forum.com/.

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

Safety Articles | Usenet Groups | Usenet News | Bluegrass