Stopping a Distributed Ruby Service -


I have a script that produces a handler object and waits through DRb.thread First, join a DRb service . I would prefer the script running until I was killed clearly, so I put

  trap "INT" in the DRB.stop_ervice and   

which Successfully closes the DRB service and Ruby goes down to 1.8, but seems to have a stalemate below 1.9 (on OS X 10.6.7). By sampling the process, some strings of spinning are shown in semaphore_wait_signal_trap .

I think the way I am calling stop_service , I'm doing something wrong, but I'm not sure what happened. Can anyone give me some signs about it correctly?

OK, I think I have found solutions If I replace the original code with

 , start the DRB.read. Ensure rescue interrupts that the DRb.stop_service end   

Ctrl-C works and stops the service.

Comments