diff --git a/ChangeLog b/ChangeLog index 95598d1861..e1ad7b3131 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 16 01:00:46 2015 Naohisa Goto + + * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for + [Bug #11353] + Thu Jul 16 00:35:42 2015 Kazuhiro NISHIYAMA * .gitignore: ignore version.i. diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 75374624ef..00bbf9ee0b 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2077,4 +2077,19 @@ EOS end INPUT end if defined?(fork) + + def test_exec_close_reserved_fd + cmd = ".#{File::ALT_SEPARATOR || File::SEPARATOR}bug11353" + with_tmpchdir { + (3..6).each do |i| + ret = run_in_child(<<-INPUT) + begin + Process.exec('#{cmd}', 'dummy', #{i} => :close) + rescue SystemCallError + end + INPUT + assert_equal(0, ret) + end + } + end end