summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-15 16:39:25 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-15 16:39:25 +0000
commit66a36e9b13e3e7eee3ecc4f844be72416d1863cf (patch)
tree5ce68c259702c7d40bd5374f374d4fc5929f413f
parent80025e956b00b948ceca1ef5fd1b90a136e62913 (diff)
* test/ruby/test_process.rb (test_exec_close_reserved_fd): test for
[Bug #11353] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_process.rb15
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 95598d1..e1ad7b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 16 01:00:46 2015 Naohisa Goto <ngotogenome@gmail.com>
+
+ * test/ruby/test_process.rb (test_exec_close_reserved_fd): test for
+ [Bug #11353]
+
Thu Jul 16 00:35:42 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* .gitignore: ignore version.i.
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 7537462..00bbf9e 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