# Help - multithreading, systemcall

**URL:** <https://www.ruby-forum.com/t/help-multithreading-systemcall/128021>\
**Category:** Ruby\
**Created:** [February 4, 2008, 10:41am UTC](https://www.ruby-forum.com/t/help-multithreading-systemcall/128021 "2008-02-04T10:41:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [February 4, 2008, 10:41am UTC](https://www.ruby-forum.com/t/help-multithreading-systemcall/128021/1 "2008-02-04T10:41:39Z")

</div>

Hi All,

I am newbie to ruby,  
I have one doubt pertaining to system call and starting my server.  
I use the system call --\> system(“D:\ruby\bin\selenium.cmd”)  
This starts a server followed by which i would be calling all the  
methods in my code.  
But until the first part of system call ends, i am not able to go to  
successive methods.  
I cant stop the server and then start calling other methods since all  
methods require server to be up & running.  
My question is , Can i start the server and keep it active plus it comes  
out of the system call and start executing other methods respectively.

Let me know if you require any more information on this issue.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [February 4, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/help-multithreading-systemcall/128021/2 "2008-02-04T13:56:47Z")

</div>

2008/2/4, Idealone I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> methods require server to be up & running.  
> My question is , Can i start the server and keep it active plus it comes  
> out of the system call and start executing other methods respectively.
> 
> Let me know if you require any more information on this issue.

Ruby’s threads are green threads and hence are blocked during blocking  
system calls.

Try using ‘cmd /c “start D:\ruby\bin\selenium.cmd”’

Cheers

robert

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [February 5, 2008, 5:49am UTC](https://www.ruby-forum.com/t/help-multithreading-systemcall/128021/3 "2008-02-05T05:49:38Z")

</div>

Robert K. wrote:

> 2008/2/4, Idealone I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > methods require server to be up & running.  
> > My question is , Can i start the server and keep it active plus it comes  
> > out of the system call and start executing other methods respectively.
> > 
> > Let me know if you require any more information on this issue.
> 
> Ruby’s threads are green threads and hence are blocked during blocking  
> system calls.
> 
> Try using ‘cmd /c “start D:\ruby\bin\selenium.cmd”’
> 
> Cheers
> 
> robert

* * *

I have tried to elaborate on what i was looking for : hope this is clear

Snippet of my code(ruby):

system(“D:\ruby\bin\selenium.cmd”) → This opens a batch file which  
runs selenium SERVER on which i need to run the below given methods!

#Creating an Object to call Methods → Here I am creating an object  
from which i intend calling methods which exists another class file  
masterload = MasterLoad.new()

# Start cvis on the given URL → Method 1 …calling the

webapplication  
selenium = masterload.cvis\_start(url)

# Log into Cvis → Method 2 …logging into the web

application  
masterload.cvis\_login(userid, password)

#Select a Client → Method 3… I have multiple methods  
like this  
masterload.cvis\_selectClient(clientName)

Question1 : All the methods mentioned requires selenium  
server(system(“D:\ruby\bin\selenium.cmd”)) to be running, selenium  
server invokes an browser on which these methods are executed.  
Problem i am facing is once selenium server starts, how does it  
go to Method1…as far as my little knowledge is concern until it comes  
out of the system method, it doesnt go to the second method.  
What i am looking for is I want to start selenium server plus  
run all the methods.

Cheers

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [February 5, 2008, 8:49am UTC](https://www.ruby-forum.com/t/help-multithreading-systemcall/128021/4 "2008-02-05T08:49:23Z")

</div>

2008/2/5, Idealone I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > 
> 
> selenium = masterload.cvis\_start(url)
> 
> Question1 : All the methods mentioned requires selenium  
> server(system(“D:\ruby\bin\selenium.cmd”)) to be running, selenium  
> server invokes an browser on which these methods are executed.  
> Problem i am facing is once selenium server starts, how does it  
> go to Method1…as far as my little knowledge is concern until it comes  
> out of the system method, it doesnt go to the second method.  
> What i am looking for is I want to start selenium server plus  
> run all the methods.

I have no idea what a selenium server is nor how one “invokes methods  
on a browser”. I am afraid, you will have to disclose more detail of  
the architecture of your app and what you intend to do.

Kind regards

robert
