1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 56684: [Backport #12909]

test_process.rb: fix pgroup test

	* test/ruby/test_process.rb (TestProcess#test_execopts_pgroup):
  use dynamically assigned pid for the process group, instead of a
  magic number 2.  [ruby-core:78051] [Bug #12909]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2016-11-11 15:26:06 +00:00
parent 4450acf4ba
commit a6f510959e
2 changed files with 8 additions and 4 deletions

View file

@ -181,7 +181,11 @@ class TestProcess < Test::Unit::TestCase
io.close
assert_raise(ArgumentError) { system(*TRUECOMMAND, :pgroup=>-1) }
assert_raise(Errno::EPERM) { Process.wait spawn(*TRUECOMMAND, :pgroup=>2) }
IO.popen([RUBY, '-egets'], 'w') do |f|
assert_raise(Errno::EPERM) {
Process.wait spawn(*TRUECOMMAND, :pgroup=>f.pid)
}
end
io1 = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>true])
io2 = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>io1.pid])

View file

@ -1,10 +1,10 @@
#define RUBY_VERSION "2.3.2"
#define RUBY_RELEASE_DATE "2016-11-05"
#define RUBY_PATCHLEVEL 205
#define RUBY_RELEASE_DATE "2016-11-12"
#define RUBY_PATCHLEVEL 206
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 11
#define RUBY_RELEASE_DAY 5
#define RUBY_RELEASE_DAY 12
#include "ruby/version.h"