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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Saurabh Peshkar 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 systemAm I missing something here, or are you trying to solve the halting problem?> > Please guide me. > > Thanks in advance, > > SaurabhBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 Peshkar" <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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/. -- You received this message because you are subscribed... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.