Backed out changeset c25e7d82e56e

This causes test failures under valgrind, and we don't need the
reordering with a background allocation map builder.
This commit is contained in:
Alex Young
2012-10-08 16:01:25 +01:00
parent 32cae67a75
commit 062ecca1fd
3 changed files with 8 additions and 43 deletions

View File

@@ -314,16 +314,9 @@ module FlexNBD
while !File.socket?(ctrl)
pid, status = Process.wait2(@pid, Process::WNOHANG)
raise "server did not start (#{cmd}) - UNIX socket didn't appear" if pid
raise "server did not start (#{cmd})" if pid
sleep 0.1
end
while !socket_open?
pid, status = Process.wait2(@pid, Process::WNOHANG)
raise "server did not start (#{cmd}) - TCP socket didn't appear" if pid
sleep 0.1
end
at_exit { kill }
end
private :run_serve_cmd
@@ -518,15 +511,7 @@ module FlexNBD
hsh
end
def socket_open?
sock = (TCPSocket.new(@ip, @port) rescue nil)
!!sock
ensure
sock.close rescue nil if sock
end
end
end