Project

General

Profile

Bug #8860 » test_fork_modified.rb

yann (Yann Rouillard), 03/09/2014 01:13 PM

 
a = []
trap(:INT) { a.push(1) }
trap(:TERM) { a.push(2) }
pid = $$
begin
fork do
sleep 0.5
Process.kill(:INT, pid)
sleep 0.5
Process.kill(:TERM, pid)
end

sleep 1
a.sort
rescue NotImplementedError
[1, 2]
end

(3-3/3)