Rafael Szuminski
2010-Oct-02 18:13 UTC
Can''t stop webrick with ctrl-c or ctrl-d on linux host
Hi All I have setup a new dev system running LinuxMint 9 (Ubuntu 10.4). Running ruby 1.9.2, rails 3.0, RVM etc. One issue I have run into is that I can''t stop webrick with ctrl+c or ctrl+d and killing the terminal always leaves a stranded ruby process. Has anybody else run into this? Btw, webrick gets started by running "rails s" in. Also, ctrl+c works fine to stop a standalone ruby or python apps. I can also exit irb with ctrl+d fine. Anyhow, any help would be appreciated. Thanks Raf -- 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.
use ctrl + z On Sat, Oct 2, 2010 at 11:43 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi All > > I have setup a new dev system running LinuxMint 9 (Ubuntu 10.4). Running > ruby 1.9.2, rails 3.0, RVM etc. > > One issue I have run into is that I can''t stop webrick with ctrl+c or > ctrl+d and killing the terminal always leaves a stranded ruby process. > > Has anybody else run into this? Btw, webrick gets started by running "rails > s" in. > > Also, ctrl+c works fine to stop a standalone ruby or python apps. I can > also exit irb with ctrl+d fine. > > Anyhow, any help would be appreciated. > > Thanks > > Raf > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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.
Rafael Szuminski
2010-Oct-03 00:11 UTC
Re: Can''t stop webrick with ctrl-c or ctrl-d on linux host
Thanks, that ACTUALLY worked ;-) The question is why does ctrl+z work and ctrl+c not? Raf On Sat, Oct 2, 2010 at 11:37 AM, Bala <bala.muthaiah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> use ctrl + z > > On Sat, Oct 2, 2010 at 11:43 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Hi All >> >> I have setup a new dev system running LinuxMint 9 (Ubuntu 10.4). Running >> ruby 1.9.2, rails 3.0, RVM etc. >> >> One issue I have run into is that I can''t stop webrick with ctrl+c or >> ctrl+d and killing the terminal always leaves a stranded ruby process. >> >> Has anybody else run into this? Btw, webrick gets started by running >> "rails s" in. >> >> Also, ctrl+c works fine to stop a standalone ruby or python apps. I can >> also exit irb with ctrl+d fine. >> >> Anyhow, any help would be appreciated. >> >> Thanks >> >> Raf >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- http://www.bdcsoftware.com" - Automotive CRM -- 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.
Rafael Szuminski
2010-Oct-03 00:15 UTC
Re: Can''t stop webrick with ctrl-c or ctrl-d on linux host
Spoke too soon. Ctrl+z stops the server script but the ruby process that listens on 3000 hangs around. After using ctrl+z, I can''t restart the server because the default port is still in use. Raf On Sat, Oct 2, 2010 at 5:11 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks, that ACTUALLY worked ;-) > > The question is why does ctrl+z work and ctrl+c not? > > Raf > > On Sat, Oct 2, 2010 at 11:37 AM, Bala <bala.muthaiah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> use ctrl + z >> >> On Sat, Oct 2, 2010 at 11:43 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >> >>> Hi All >>> >>> I have setup a new dev system running LinuxMint 9 (Ubuntu 10.4). Running >>> ruby 1.9.2, rails 3.0, RVM etc. >>> >>> One issue I have run into is that I can''t stop webrick with ctrl+c or >>> ctrl+d and killing the terminal always leaves a stranded ruby process. >>> >>> Has anybody else run into this? Btw, webrick gets started by running >>> "rails s" in. >>> >>> Also, ctrl+c works fine to stop a standalone ruby or python apps. I can >>> also exit irb with ctrl+d fine. >>> >>> Anyhow, any help would be appreciated. >>> >>> Thanks >>> >>> Raf >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > > -- > http://www.bdcsoftware.com" - Automotive CRM >-- http://www.bdcsoftware.com" - Automotive CRM -- 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.
Rafael Szuminski
2010-Oct-03 00:23 UTC
Re: Can''t stop webrick with ctrl-c or ctrl-d on linux host
Ok, I started experimenting with different key combinations and it seems that ctrl+alt+c does the trick. Raf On Sat, Oct 2, 2010 at 5:15 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Spoke too soon. Ctrl+z stops the server script but the ruby process that > listens on 3000 hangs around. After using ctrl+z, I can''t restart the server > because the default port is still in use. > > Raf > > > On Sat, Oct 2, 2010 at 5:11 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Thanks, that ACTUALLY worked ;-) >> >> The question is why does ctrl+z work and ctrl+c not? >> >> Raf >> >> On Sat, Oct 2, 2010 at 11:37 AM, Bala <bala.muthaiah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> use ctrl + z >>> >>> On Sat, Oct 2, 2010 at 11:43 PM, Rafael Szuminski <raf1hh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>> >>>> Hi All >>>> >>>> I have setup a new dev system running LinuxMint 9 (Ubuntu 10.4). >>>> Running ruby 1.9.2, rails 3.0, RVM etc. >>>> >>>> One issue I have run into is that I can''t stop webrick with ctrl+c or >>>> ctrl+d and killing the terminal always leaves a stranded ruby process. >>>> >>>> Has anybody else run into this? Btw, webrick gets started by running >>>> "rails s" in. >>>> >>>> Also, ctrl+c works fine to stop a standalone ruby or python apps. I can >>>> also exit irb with ctrl+d fine. >>>> >>>> Anyhow, any help would be appreciated. >>>> >>>> Thanks >>>> >>>> Raf >>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> >> >> -- >> http://www.bdcsoftware.com" - Automotive CRM >> > > > > -- > http://www.bdcsoftware.com" - Automotive CRM >-- http://www.bdcsoftware.com" - Automotive CRM -- 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.
Marnen Laibow-Koser
2010-Oct-04 18:52 UTC
Re: Can''t stop webrick with ctrl-c or ctrl-d on linux host
Rafael Szuminski wrote:> Spoke too soon. Ctrl+z stops the server script but the ruby process that > listens on 3000 hangs around. After using ctrl+z, I can''t restart the > server > because the default port is still in use.Right -- because C-z only *suspends* the process and does not kill it. When you hit C-z, you will see a message that begins like [1]+ Stopped The number in brackets is the job number. To kill the process, type kill -9 %{JOB} at the shell prompt, where {JOB} is the job number -- so in this example, it would be kill -9 %1 . I''ve never seen this with Webrick, but sometimes Autospec responds to C-z and not to C-c. The method I just described is useful. If any of this is mysterious to you, please read a little about how processes work on *nix.> > RafBest, -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bala
2010-Oct-04 20:30 UTC
Re: Re: Can''t stop webrick with ctrl-c or ctrl-d on linux host
oops sorry for not replying. hope you got the answer :) On Tue, Oct 5, 2010 at 12:22 AM, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Rafael Szuminski wrote: > > Spoke too soon. Ctrl+z stops the server script but the ruby process that > > listens on 3000 hangs around. After using ctrl+z, I can''t restart the > > server > > because the default port is still in use. > > Right -- because C-z only *suspends* the process and does not kill it. > When you hit C-z, you will see a message that begins like > [1]+ Stopped > > The number in brackets is the job number. To kill the process, type > kill -9 %{JOB} > at the shell prompt, where {JOB} is the job number -- so in this > example, it would be kill -9 %1 . > > I''ve never seen this with Webrick, but sometimes Autospec responds to > C-z and not to C-c. The method I just described is useful. > > If any of this is mysterious to you, please read a little about how > processes work on *nix. > > > > > Raf > > Best, > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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.