This is more of a ruby question but I thought I''d give a shot over here as well. The scenario (for test purposes) I''m trying to accomplish when running rake on a new Rakefile is: 1) start a server and get its pid 2) run things that sends stuff to the server 3) stop the server I''ve tried using IO''s popen, fork, thread, even sending the server to>>/dev/null when starting it but none of them work as I expected. Oncethe server (step 1) starts it just hangs in there, not letting the following steps to run. But if I kill the server (control+c) the step 2 tries to run and fails because the server is no longer running. Any ideas how it can be done? Thanks a lot. -- 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-/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 -~----------~----~----~----~------~----~------~--~---
What server are you trying to start? If it is mongrel, perhaps sending it the -d flag so it starts in daemon mode? V/r Anthony On 1/10/07, Jimmy <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > This is more of a ruby question but I thought I''d give a shot over here > as well. > > The scenario (for test purposes) I''m trying to accomplish when running > rake on a new Rakefile is: > > 1) start a server and get its pid > 2) run things that sends stuff to the server > 3) stop the server > > I''ve tried using IO''s popen, fork, thread, even sending the server to > >>/dev/null when starting it but none of them work as I expected. Once > the server (step 1) starts it just hangs in there, not letting the > following steps to run. But if I kill the server (control+c) the step 2 > tries to run and fails because the server is no longer running. > > Any ideas how it can be done? > > Thanks a lot. > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Cell: 808 782-5046 Current Location: Melbourne, FL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Anthony Eden wrote:> What server are you trying to start? If it is mongrel, perhaps sending > it the -d flag so it starts in daemon mode? > > V/r > Anthony > > On 1/10/07, Jimmy <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > -- > Cell: 808 782-5046 > Current Location: Melbourne, FLAnthony, I''m trying to start a java server, which unfortunately doesn''t have the option to ''daemonize'' it. -- 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-/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 -~----------~----~----~----~------~----~------~--~---