[Rg 151] Re: Daemonizing mongrel?
Keita Yamaguchi
keita.yamaguchi at gmail.com
Thu Jan 31 23:29:59 EST 2008
Hello,
> Mongrel supports a daemonized mode. Is it possible to use this mode via
> the Ramaze mongrel adapter?
I think the adapter doesn't support to setup Mongrel configurations.
Mongrel's daemonized mode uses the gem "daemons". So you can do the
same thing by like this code:
---
require "daemons/daemonize"
Daemonize.daemonize
Ramaze.start
---
I think Daemons.run is also good.
---
require 'daemons'
# exec start.rb
Daemons.run('start.rb')
---
More simply, you can use Process.daemon on Ruby 1.9.x.
---
Process.daemon
Ramaze.start
---
Process.setsid is useful If Ruby 1.8.x.
---
fork {
Process.setsid
Ramaze.start
}
---
These ways are general methods for daemonization with Ramaze
adapters(webrick, thin, etc.).
Keita Yamaguchi
On Feb 1, 2008 3:55 AM, Lars Olsson <lasso at lassoweb.se> wrote:
> Hi list!
>
> Mongrel supports a daemonized mode. Is it possible to use this mode via
> the Ramaze mongrel adapter?
>
> Kindly
>
> /lasso
>
> --
> ________________________________________
> Lars Olsson
> lasso at lassoweb.se
> http://www.lassoweb.se/
> _______________________________________________
> Ramaze-general mailing list
> Ramaze-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ramaze-general
>
More information about the Ramaze-general
mailing list