DRb.thread.join causes the calling thread to wait for the completion of the DRb execution thread. If you want to catch the INT signal, I would rather go with the following code.
$execute = true DRb.start_service Signal.trap("INT") { $execute = false } while $execute sleep 1 end DRb.stop_service
Please note that in this case there is no DRb.thread.join . Also, a preferred method is to capture a signal rather than save the interrupt exception.
alediaferia
source share