From bb65920642330cb375b3649496dca95e27aee04b Mon Sep 17 00:00:00 2001 From: shirosaki Date: Sat, 28 Jan 2012 00:51:40 +0000 Subject: * test/ruby/test_thread.rb (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status assertion because we cannot get signal status on Windows. * win32/win32.c (CreateChild): create process group to receive the signal by GenerateConsoleCtrlEvent(). * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT if a process group is specified. CTRL_C_EVENT signal cannot be generated for process groups for the specification. [ruby-dev:45149] [Bug #5812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_thread.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 0931de5659..6f7d1280bd 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -694,9 +694,14 @@ class TestThreadGroup < Test::Unit::TestCase Process.kill(:SIGINT, pid) Process.wait(pid) s = $? - assert_equal([false, true, false], - [s.exited?, s.signaled?, s.stopped?], - "[s.exited?, s.signaled?, s.stopped?]") + if /mswin|mingw/ =~ RUBY_PLATFORM + # status of signal is not supported on Windows + assert_equal(pid, s.pid) + else + assert_equal([false, true, false], + [s.exited?, s.signaled?, s.stopped?], + "[s.exited?, s.signaled?, s.stopped?]") + end t1 = Time.now.to_f assert_in_delta(t1 - t0, 1, 1) end -- cgit v1.2.3