ruby-changes:25787
From: nagachika <ko1@a...>
Date: Mon, 26 Nov 2012 01:59:21 +0900 (JST)
Subject: [ruby-changes:25787] nagachika:r37844 (trunk): * test/ruby/test_process.rb (test_setsid): call Process.getsid for
nagachika 2012-11-26 01:59:07 +0900 (Mon, 26 Nov 2012) New Revision: 37844 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37844 Log: * 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. Modified files: trunk/ChangeLog trunk/test/ruby/test_process.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 37843) +++ ChangeLog (revision 37844) @@ -1,3 +1,9 @@ +Mon Nov 26 01:54:26 2012 CHIKANAGA Tomoyuki <nagachika@r...> + + * 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. + Sun Nov 25 22:34:00 2012 Hiroshi Shirosaki <h.shirosaki@g...> * array.c (ary_resize_smaller): new function to resize array. Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 37843) +++ test/ruby/test_process.rb (revision 37844) @@ -1566,11 +1566,13 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/