  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

