phil
2009-Feb-01 09:24 UTC
under windows: launching an external app via system... but not waiting for a response
Hi, I have an application written in Ruby (it''s actually a windows service). It needs to launch other applications. The problem I am having is that when I call system("args to launch app") it never returns, because I guess the app never returns until it is closed. I want to be able to launch the app and then continue on. What is the proper way to do this? A thread? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
javier ramirez
2009-Feb-01 11:04 UTC
Re: under windows: launching an external app via system... but not waiting for a response
> service). It needs to launch other applications. The problem I am > having is that when I call system("args to launch app") it never > returns, because I guess the app never returns until it is closed. >you can use the "start" windows command, so from your system call you would call "start" passing the parameters to start your external application. If you don''t want to see a shell window, you can pass /B to the start command regards, -- javier ramÃrez ..i do ruby on rails development in madrid, spain, at http://www.aspgems.com ..you can find out more about me on http://formatinternet.wordpress.com and http://workingwithrails.com/person/5987-javier-ramirez --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Mohit Sindhwani
2009-Feb-01 15:07 UTC
Re: under windows: launching an external app via system... but not waiting for a response
phil wrote:> Hi, > I have an application written in Ruby (it''s actually a windows > service). It needs to launch other applications. The problem I am > having is that when I call system("args to launch app") it never > returns, because I guess the app never returns until it is closed. >Do a system ("start application.exe args to launch app") --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---