On Apr 24, 2009, at 08:11, Tim Pease wrote:
> # ...
>
> This is the standard code to daemonize a process. The use of "exit"
> bothers me slightly, as it will call all "at_exit" handlers in the
> parent. I do not believe this is the desired behavior; the "at_exit"
> handlers will free resources that the daemonized process might need.
> Instead, "exit!" should be used to prevent "at_exit" handlers from
> being called.
>
> Any thoughts about this subtle change? Are there any undesirable side
> effects that arise from using exit! instead of exit ?

Why not just:

require 'webrick/server'

WEBrick::Dameon.start

It has exit! and all that built-in.