* test/ruby/test_process.rb (test_setsid): added a few wait for
preventing that Process.getsid(io.pid) makes Errno::ESRCH. (refix r37844) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
251dbc1241
commit
769781a099
@ -1,8 +1,7 @@
|
|||||||
Mon Nov 26 01:54:26 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
|
Mon Nov 26 10:50:19 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* test/ruby/test_process.rb (test_setsid): call Process.getsid for
|
* test/ruby/test_process.rb (test_setsid): added a few wait for
|
||||||
child process in child process. because parent process call
|
preventing that Process.getsid(io.pid) makes Errno::ESRCH.
|
||||||
Process.getsid with io.pid, Errno::ESRCH could be raised.
|
|
||||||
|
|
||||||
Sun Nov 25 22:34:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
Sun Nov 25 22:34:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
||||||
|
|
||||||
|
@ -1566,13 +1566,15 @@ class TestProcess < Test::Unit::TestCase
|
|||||||
Marshal.dump(Process.getsid, STDOUT)
|
Marshal.dump(Process.getsid, STDOUT)
|
||||||
newsid = Process.setsid
|
newsid = Process.setsid
|
||||||
Marshal.dump(newsid, STDOUT)
|
Marshal.dump(newsid, STDOUT)
|
||||||
Marshal.dump(Process.getsid($$), STDOUT)
|
|
||||||
STDOUT.flush
|
STDOUT.flush
|
||||||
|
sleep 3
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
# test Process.getsid() w/o arg
|
||||||
assert_equal(Marshal.load(io), Process.getsid)
|
assert_equal(Marshal.load(io), Process.getsid)
|
||||||
newsid = Marshal.load(io)
|
# test Process.setsid return value and Process::getsid(pid)
|
||||||
getsid = Marshal.load(io)
|
assert_equal(Marshal.load(io), Process.getsid(io.pid))
|
||||||
assert_equal(newsid, getsid)
|
Process.kill(:KILL, io.pid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user