setsid-openbsd.diff

skip the Process::getsid(pid) in the test - George Koehler, 02/06/2013 08:31 AM

Download (815 Bytes)

View differences:

test/ruby/test_process.rb
1585 1585

  
1586 1586
      # test Process.getsid() w/o arg
1587 1587
      assert_equal(Marshal.load(io), Process.getsid)
1588
      # test Process.setsid return value and Process::getsid(pid)
1589
      assert_equal(Marshal.load(io), Process.getsid(io.pid))
1588

  
1589
      if /openbsd/ =~ RUBY_PLATFORM
1590
        # OpenBSD doesn't allow Process::getsid(pid) when pid is in
1591
        # different session.
1592
        refute_equal(Marshal.load(io), Process.getsid)
1593
      else
1594
        # test Process.setsid return value and Process::getsid(pid)
1595
        assert_equal(Marshal.load(io), Process.getsid(io.pid))
1596
      end
1597

  
1590 1598
      Process.kill(:KILL, io.pid)
1591 1599
    end
1592 1600
  end