Farrel Lifson
4/30/2007 1:34:00 PM
On 30/04/07, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> On Mon, 30 Apr 2007, Farrel Lifson wrote:
>
> >
> > Hi Ara,
> >
> > In my code I used fork with a block (taken from server.rb):
> > def create_client(hostname=nil,port=nil)
> > pid = fork do
> > @klass.start(hostname,port,self.url)
> > end
> > Process.detach(pid)
> > pid
> > end
> > end
>
> that looks reasonable.
>
> > Could that be causing the strange issue I'm having? I assumed that was a
> > safe way of using fork as the child only runs what's in the block. My main
> > puzzle is why the server loses it's reference to the client process after it
> > has registered.
>
> hard to say without seeing the code ;-)
Hi Ara,
Thanks for the help, I hope you don't mind me badgering you but from
my time on the list I know you are one of the resident DRb experts so
I'm grabbing the opportunity to get some expert advice here.
I attached the code I'm using in my first email, comprising three
files (base.rb, client.rb and server.rb) with the unit tests
illustrating my problems in server.rb . If it got stripped out let me
know and I can try and resend it. In the meantime I will check out the
DRb samples directorty and see if that helps.
Thanks again,
Farrel