summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--test/ruby/test_process.rb6
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0da7674685..7f007e2cd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Nov 26 01:54:26 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * 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@gmail.com>
* array.c (ary_resize_smaller): new function to resize array.
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