summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-25 16:59:07 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-25 16:59:07 +0000
commit997518c677a708b86f9ec8b26b6fe6df60a01485 (patch)
treedb2c4d85de683522be6d9dd1709cc0887f14ef88 /test
parent56132b13465c2c766fc15b8c04a7fb116315cd45 (diff)
* test/ruby/test_process.rb (test_setsid): call Process.getsid for
child process in child process. because parent process call Process.getsid with io.pid, Errno::ESRCH could be raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index ce80beabdd..c5c9d8af79 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1566,11 +1566,13 @@ class TestProcess < Test::Unit::TestCase
Marshal.dump(Process.getsid, STDOUT)
newsid = Process.setsid
Marshal.dump(newsid, STDOUT)
+ Marshal.dump(Process.getsid($$), STDOUT)
STDOUT.flush
EOS
-
assert_equal(Marshal.load(io), Process.getsid)
- assert_equal(Marshal.load(io), Process.getsid(io.pid))
+ newsid = Marshal.load(io)
+ getsid = Marshal.load(io)
+ assert_equal(newsid, getsid)
end
end
end