ruby-changes:39178
From: ngoto <ko1@a...>
Date: Thu, 16 Jul 2015 01:39:53 +0900 (JST)
Subject: [ruby-changes:39178] ngoto:r51259 (trunk): * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for
ngoto 2015-07-16 01:39:25 +0900 (Thu, 16 Jul 2015) New Revision: 51259 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51259 Log: * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for [Bug #11353] Modified files: trunk/ChangeLog trunk/test/ruby/test_process.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 51258) +++ ChangeLog (revision 51259) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jul 16 01:00:46 2015 Naohisa Goto <ngotogenome@g...> + + * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for + [Bug #11353] + Thu Jul 16 00:35:42 2015 Kazuhiro NISHIYAMA <zn@m...> * .gitignore: ignore version.i. Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 51258) +++ test/ruby/test_process.rb (revision 51259) @@ -2077,4 +2077,19 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L2077 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/