summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_process.rb16
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c9591906f5..a59f5240d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 1e72998e17..1230778711 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -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