1 # -*- encoding: binary -*-
2 $stdout.sync = $stderr.sync = true
19 def yield_for_monitor_update # mogilefsd should update every 4 seconds
27 x("mogadm", "--trackers=#{@trackers.join(',')}", *args)
31 out, err = tmpfile("out"), tmpfile("err")
32 puts cmd.join(' ') if $VERBOSE
34 $stderr.reopen(err.path, "a")
35 $stdout.reopen(out.path, "a")
40 _, status = Process.waitpid2(pid)
47 status, out, err = mogadm(*args)
48 assert status.success?, "#{status.inspect} / #{out.read} / #{err.read}"
53 status, out, err = x(*cmd)
54 assert status.success?, "#{status.inspect} / #{out.read} / #{err.read}"
59 tmp = Tempfile.new(name)
60 defined?(@to_close) or @to_close = []