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 via
http://www.ruby-...
.
it appears that Ruby will wait. try this
$ ruby -e 'system("sleep 5");p "hi"'
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Will a "system call" wait until the command finishes?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password