Class: Tlb::ForkBalancerProcess
Instance Method Summary
collapse
#initialize, #stop_pumping
Instance Method Details
#die ⇒ Object
181
182
183
184
185
|
# File 'lib/tlb.rb', line 181
def die
super
@pid = nil
Process.wait
end
|
#start(server_command) ⇒ Object
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
# File 'lib/tlb.rb', line 165
def start server_command
@pid, input, out, err = Open4.popen4(server_command)
unless (out)
raise "out was nil"
end
return Class.new(StreamPumper) do
def data_available?
not @stream.eof?
end
def read
@stream.read
end
end, out, err
end
|