diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index e5ff7cd..0b1c6c0 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1585,8 +1585,16 @@ EOS # test Process.getsid() w/o arg assert_equal(Marshal.load(io), Process.getsid) - # test Process.setsid return value and Process::getsid(pid) - assert_equal(Marshal.load(io), Process.getsid(io.pid)) + + if /openbsd/ =~ RUBY_PLATFORM + # OpenBSD doesn't allow Process::getsid(pid) when pid is in + # different session. + refute_equal(Marshal.load(io), Process.getsid) + else + # test Process.setsid return value and Process::getsid(pid) + assert_equal(Marshal.load(io), Process.getsid(io.pid)) + end + Process.kill(:KILL, io.pid) end end