Hi RPM,

> From: Ross Mohn
> Sent: Tuesday, December 05, 2000 2:40 AM

> I'm playing with rinda, tuplespaces, etc. When I want to close a 
> tuplespace, what's the proper procedure. Since the script does a thread 
> join at the end, I thought that would imply that there is a graceful way to 
> exit. I've been doing a ^C without any problem, but if there is a better 
> way, I'd like to know it. (Same thing for a tuple server).
> 
>     DRb.start_service('druby://:7640', TupleSpace.new)
>     puts DRb.uri
>     DRb.thread.join

I am afraid if I did not understand you, do you want to
know how to stop daemon?  Since tuple server should always
awake whenever client connects, I think the server should
not be stopped by special signal like ^C.

Using drb-1.2.2:
  trap( "INT" ) { DRb.thread.kill }
  DRb.start_service( 'druby://:7640', TupleSpace.new )
  puts DRb.uri
  DRb.thread.join
  puts 'exit...'

Using drb-1.3.x:
  trap( "INT" ) { DRb.stop_service }
  DRb.start_service( 'druby://:7640', TupleSpace.new )
  puts DRb.uri
  DRb.thread.join
  puts 'exit...'

Using lightweight trick:
  DRb.start_service( 'druby://:7640', TupleSpace.new )
  puts DRb.uri
  if $DEBUG
    gets
    puts 'exit...'
    exit
  else
    DRb.thread.join
  end

> Also, I'm getting some inconsistent behavior if I use an actual IP address 
> to start the service. I.e. 'druby://012.345.678.901:7640. Anybody else use 
> this with IPs?

Can you tell me more detail of the behaviors and your source?

// NaHi