mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
42b1337551
commit
88903e23dd
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Feb 4 02:18:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* test/ruby/test_process.rb (test_setsid): skip when platform is
|
||||||
|
OpenBSD. Contributed from George Koehler.
|
||||||
|
[Bug #7789] [ruby-core:51889]
|
||||||
|
|
||||||
Wed Feb 6 13:35:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Feb 6 13:35:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new
|
* proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new
|
||||||
|
|
|
@ -1574,6 +1574,9 @@ class TestProcess < Test::Unit::TestCase
|
||||||
def test_setsid
|
def test_setsid
|
||||||
return unless Process.respond_to?(:setsid)
|
return unless Process.respond_to?(:setsid)
|
||||||
return unless Process.respond_to?(:getsid)
|
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|
|
IO.popen([RUBY, "-e", <<EOS]) do|io|
|
||||||
Marshal.dump(Process.getsid, STDOUT)
|
Marshal.dump(Process.getsid, STDOUT)
|
||||||
|
@ -1585,9 +1588,13 @@ EOS
|
||||||
|
|
||||||
# test Process.getsid() w/o arg
|
# test Process.getsid() w/o arg
|
||||||
assert_equal(Marshal.load(io), Process.getsid)
|
assert_equal(Marshal.load(io), Process.getsid)
|
||||||
|
|
||||||
# test Process.setsid return value and Process::getsid(pid)
|
# test Process.setsid return value and Process::getsid(pid)
|
||||||
assert_equal(Marshal.load(io), Process.getsid(io.pid))
|
assert_equal(Marshal.load(io), Process.getsid(io.pid))
|
||||||
Process.kill(:KILL, io.pid)
|
Process.kill(:KILL, io.pid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue