(TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
  Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
  flag is not specified in a call to CreateProcessW().

* win32/win32.c (CreateChild): revert the usage of
  CREATE_NEW_PROCESS_GROUP flag for compatibility.
  [ruby-core:43245][Bug #6131]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shirosaki 2012-04-07 14:10:25 +00:00
Родитель 5638bbdab6
Коммит fc83ebb037
3 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,14 @@
Sat Apr 7 22:32:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/ruby/test_thread.rb
(TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
flag is not specified in a call to CreateProcessW().
* win32/win32.c (CreateChild): revert the usage of
CREATE_NEW_PROCESS_GROUP flag for compatibility.
[ruby-core:43245][Bug #6131]
Sat Apr 7 10:28:40 2012 Aaron Patterson <aaron@tenderlovemaking.com> Sat Apr 7 10:28:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych.rb: bumping up psych version to match release. * ext/psych/lib/psych.rb: bumping up psych version to match release.

Просмотреть файл

@ -681,6 +681,7 @@ class TestThreadGroup < Test::Unit::TestCase
end end
def test_thread_timer_and_interrupt def test_thread_timer_and_interrupt
skip 'Process.kill cannot kill a subprocess' if /mswin|mingw/ =~ RUBY_PLATFORM
bug5757 = '[ruby-dev:44985]' bug5757 = '[ruby-dev:44985]'
t0 = Time.now.to_f t0 = Time.now.to_f
pid = nil pid = nil

Просмотреть файл

@ -1137,7 +1137,7 @@ CreateChild(const WCHAR *cmd, const WCHAR *prog, SECURITY_ATTRIBUTES *psa,
aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE); aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
} }
dwCreationFlags = (CREATE_NEW_PROCESS_GROUP | NORMAL_PRIORITY_CLASS); dwCreationFlags = NORMAL_PRIORITY_CLASS;
if (lstrlenW(cmd) > 32767) { if (lstrlenW(cmd) > 32767) {
child->pid = 0; /* release the slot */ child->pid = 0; /* release the slot */