# Rails System Commad

**URL:** <https://www.ruby-forum.com/t/rails-system-commad/183225>\
**Category:** Rails\
**Created:** [February 10, 2010, 6:37am UTC](https://www.ruby-forum.com/t/rails-system-commad/183225 "2010-02-10T06:37:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabhpurnaye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Post date:** [February 10, 2010, 6:37am UTC](https://www.ruby-forum.com/t/rails-system-commad/183225/1 "2010-02-10T06:37:03Z")

</div>

Hi All,

I’m having the following scenario:

In my code i run the rails system command

system “say xyz”

Suppose this “say xyz” command runs a process for a very long period of  
time then I want to:

1. stop/kill that process through rails code on click of button.
2. can I determine whether the system command is running properly and  
not had hanged the system?

Please guide me.

Thanks in advance,

Saurabh

---

<div class="post-metadata">

**Author:** ![saurabhpurnaye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Post date:** [February 10, 2010, 6:41am UTC](https://www.ruby-forum.com/t/rails-system-commad/183225/2 "2010-02-10T06:41:59Z")

</div>

Saurabh P. wrote:

> Hi All,
> 
> I’m having the following scenario:
> 
> In my code i run the rails system command
> 
> system “say xyz”
> 
> Suppose this “say xyz” command runs a process for a very long period of  
> time then I want to:
> 
> 1. stop/kill that process through rails code on click of button.
> 2. can I determine whether the system command is running properly and  
> not had hanged the system

Am I missing something here, or are you trying to solve the halting  
problem?

> Please guide me.
> 
> Thanks in advance,
> 
> Saurabh

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![saurabhpurnaye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Post date:** [February 10, 2010, 6:48am UTC](https://www.ruby-forum.com/t/rails-system-commad/183225/3 "2010-02-10T06:48:21Z")

</div>

Hi Marnen,

I am trying to determine whether the system command which I had run is  
running properly on the console or not, through ruby code.

Thanks,  
Saurabh

---

<div class="post-metadata">

**Author:** ![saurabhpurnaye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee59a6/32.png) [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Post date:** [February 10, 2010, 3:29pm UTC](https://www.ruby-forum.com/t/rails-system-commad/183225/4 "2010-02-10T15:29:36Z")

</div>

If you need to run commands in the background, a message queue is the  
way  
to go. Resque and resque-status offer you some ability to check in on  
the  
progress of background jobs, though if you’re shelling out you’d still  
need  
to have some way for your background worker to monitor the (forked)  
process,  
which depends on what exactly it is you’re doing.

On Feb 10, 2010 12:48 AM, “Saurabh P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

Hi Marnen,

I am trying to determine whether the system command which I had run is  
running properly on the console or not, through ruby code.

Thanks,  
Saurabh

–  
Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

–  
You received this message because you are subscribed…
