C
Christopher Aldridge
all, I couldnt get this to work so I'm hoping that someone can offer
assistance..
I've got ~ 9 XP machines that run server.rb from
\\sambaserver\server.rb (for example)
When I make changes to \\sambaserver\server.rb, I'd like to tell the
clients to restart server.rb.
Initally, I figured I could do it as such
##forgive sytax as I can't see my original code from here..
//------------------------server-------------------------//
class server
def handle_job
puts "doing what server should do day to day"
end
def manage_server
puts "shutting down server"
IO.popen("start server.rb") ##opens new dos prompt
drb_stop_service ##kills this drb service (or should)
end
end
sleep 10 #### to allow this process to die, and free up the listening port
DRb.start_service ## for class server
//------------------------/server------------------------//
What seems to happen, is netstat displays a persistant established
session to the server port until the new server (opened with start)
exists with a drb error stating it cant bind to the listening port,
(due to the fact that the parent server.rb is utilizing it)
Any way around this? I'd really like to be able to manage these
servers with out manual restarts etc.
Cheers
assistance..
I've got ~ 9 XP machines that run server.rb from
\\sambaserver\server.rb (for example)
When I make changes to \\sambaserver\server.rb, I'd like to tell the
clients to restart server.rb.
Initally, I figured I could do it as such
##forgive sytax as I can't see my original code from here..
//------------------------server-------------------------//
class server
def handle_job
puts "doing what server should do day to day"
end
def manage_server
puts "shutting down server"
IO.popen("start server.rb") ##opens new dos prompt
drb_stop_service ##kills this drb service (or should)
end
end
sleep 10 #### to allow this process to die, and free up the listening port
DRb.start_service ## for class server
//------------------------/server------------------------//
What seems to happen, is netstat displays a persistant established
session to the server port until the new server (opened with start)
exists with a drb error stating it cant bind to the listening port,
(due to the fact that the parent server.rb is utilizing it)
Any way around this? I'd really like to be able to manage these
servers with out manual restarts etc.
Cheers