On Sat, 14 Oct 2006, Ian Leitch wrote:

> Hi list,
>
> I am trying to make my DRb server fork into a daemon, yet the DRbServer
> thread joins immediately when called inside a fork block. I'm not entirely
> sure why this is happening but I'm coming to the conclusion that I'm going
> to have to resort to a sleeping while loop. I also tried blocking on a Mutex
> to keep the process running, but that resulted in an error about blocking
> the only thread (which isn't true because I have a pool of them, plus the
> DRbServer thread which should still be running).
> I did find a commit by matz some time ago about removing a "fork kills
> threads" warning or some such, is this related?
>
> Cheers,
> Ian.

you have to fork first.

   fork{
     fork{
       start_drb
     }
     exit!
   }

fyi.

check out the code for slave - it does this and a bit more - though it's not
geared towards daemons.

-a
-- 
my religion is very simple.  my religion is kindness. -- the dalai lama