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

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

On Feb 15, 2:44 pm, sayoyo Sayoyo [email protected] wrote:

Posted viahttp://www.ruby-forum.com/.
it appears that Ruby will wait. try this
$ ruby -e ‘system(“sleep 5”);p “hi”’