Rename serve->has_control to serve->success.

This makes the use of this variable to signal an unexpected SIGTERM
while migrating less confusing.
This commit is contained in:
Alex Young
2012-10-09 17:20:39 +01:00
parent a039ceffcb
commit 161d2fccf1
9 changed files with 128 additions and 104 deletions

View File

@@ -310,13 +310,14 @@ module FlexNBD
debug( cmd )
@pid = @executor.run( cmd )
start_wait_thread( @pid )
while !File.socket?(ctrl)
pid, status = Process.wait2(@pid, Process::WNOHANG)
raise "server did not start (#{cmd})" if pid
sleep 0.1
end
start_wait_thread( @pid )
at_exit { kill }
end
private :run_serve_cmd