| Class | DRb::InsecureProtectedMethodsTest |
| In: |
lib/drb/insecure_protected_methods.rb
|
| Parent: | Test::Unit::TestCase |
# File lib/drb/insecure_protected_methods.rb, line 58 def setup rd, wr = IO.pipe unless @srv_pid = fork # son rd.close DRb.start_service("druby://localhost:42000", SrvFoo.new) wr.puts('ready') wr.close DRb.thread.join else # father wr.close rd.gets @drb_srv = DRb.start_service @drb_obj = DRbObject.new(nil, "druby://localhost:42000") rd.close end end
# File lib/drb/insecure_protected_methods.rb, line 75 def teardown @drb_srv.stop_service unless @drb_srv.nil? Process.kill('TERM', @srv_pid) Process.waitpid(@srv_pid) end