DRb and xinetd / inetd

J

Jon Evans

Hi,

I've written a simple DRb service and I'd like to run it under xinetd
so that xinetd can babysit it and restart it if it crashes.

I tried my script with no modifications and it didn't work, because
(obviously in hindsight) xinetd opens the port that my DRb service is
configured to listen to, so it refuses to start up.

How can I rewrite my script so that it starts a DRb service listening
on the socket that xinetd passes to the process when it starts up?

Thanks

Jon

PS my script, trimmed to only show the relevant parts:

#!/usr/bin/env ruby

require 'drb'
require 'myserver'

DRb.start_service("druby://localhost:10070", MyServerClass.new)
puts "DRb infra login service listening on #{DRb.uri}"
DRb.thread.join
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top