# File test/test_multi_process.rb, line 134 def test_cancel pin, pout = IO.pipe pid = fork{ pout.close pin.read(1) pin.close @restart_signal.notify_restart # call on child process exit! } pin.close begin th = Thread.new{ @restart_signal.wait # call on parent process } @restart_signal.cancel # call on parent process pout.write("\0") pout.close ensure th.join end Process.waitpid(pid, 0) assert_equal(0, @restart_call) assert_equal(0, @close_call) end