[Nitro] Telling WEBrick Nitro to kill itself
george.moschovitis at gmail.com
Mon Sep 19 03:00:08 EDT 2005
Ok, sounds reasonable, will add this!
On 9/18/05, James Britt <james_b at neurogami.com> wrote:
> George Moschovitis wrote:
> > Hm this is not supported at the moment. Moreover, I am not sure how
> > this could be implemented. Care to give some tips (or even better a
> > patch?).
> There needs to be way to talk to the WEBrick server variable to issue it
> a shutdown command.
> For example, in Mousehole, which is a WEBrick app, I added this to my copy:
> server.mount_proc('/quit') do |req, resp| server.shutdown; exit; end
> So I can now call
> and mousehole goes away.
> > thanks,
> > -g.
> > PS: out of curiosity, where is this feature useful?
> I sometimes run WEBrick Web apps on windows using rubyw.exe, which does
> not then allow for ctrl-C. (Same behavior, I think, as following a
> command call with the ampersand on unix). Simple Ruby services without
> having to have an annoying cmd window sitting around all day.
> So I typically add in a way to send a request to the application to shut
> itself down. Usually some special URL that maps to code that calls
> Nitro-general mailing list
> Nitro-general at rubyforge.org
More information about the Nitro-general