1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_process.rb (test_setsid): ensure to call

Process.wait(). Reported by George Koehler. Thanks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2013-02-06 06:37:28 +00:00
parent 88903e23dd
commit 6cd1e11d01
2 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,8 @@
Mon Feb 4 02:22:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* test/ruby/test_process.rb (test_setsid): ensure to call
Process.wait(). Reported by George Koehler. Thanks.
Mon Feb 4 02:18:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* test/ruby/test_process.rb (test_setsid): skip when platform is

View file

@ -1583,15 +1583,17 @@ class TestProcess < Test::Unit::TestCase
newsid = Process.setsid
Marshal.dump(newsid, STDOUT)
STDOUT.flush
sleep 3
EOS
begin
# test Process.getsid() w/o arg
assert_equal(Marshal.load(io), Process.getsid)
# 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)
# test Process.setsid return value and Process::getsid(pid)
assert_equal(Marshal.load(io), Process.getsid(io.pid))
ensure
Process.kill(:KILL, io.pid)
Process.wait(io.pid)
end
end
end