diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-06 06:37:18 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-06 06:37:18 +0000 |
commit | 88903e23dd4ec7e58fe3ffb0070ec7fdcd0d6b8f (patch) | |
tree | a29ecf4b4b8f87be5ce7bf7d12f0bfa63ec9fdc4 /test | |
parent | 42b1337551b7f9692457ee52f57f5c873e854b55 (diff) |
* test/ruby/test_process.rb (test_setsid): skip when platform is
OpenBSD. Contributed from George Koehler.
[Bug #7789] [ruby-core:51889]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index e5ff7cd2c6..1e72998e17 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1574,6 +1574,9 @@ class TestProcess < Test::Unit::TestCase def test_setsid return unless Process.respond_to?(:setsid) return unless Process.respond_to?(:getsid) + # OpenBSD doesn't allow Process::getsid(pid) when pid is in + # different session. + return if /openbsd/ =~ RUBY_PLATFORM IO.popen([RUBY, "-e", <<EOS]) do|io| Marshal.dump(Process.getsid, STDOUT) @@ -1585,9 +1588,13 @@ 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)) Process.kill(:KILL, io.pid) end end + + + end |