diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-15 16:39:25 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-15 16:39:25 +0000 |
commit | 9cd0b20620fdf1ff457fca5a140053d0c2c4bbde (patch) | |
tree | 5ce68c259702c7d40bd5374f374d4fc5929f413f /test | |
parent | b33e29edea33b07387517c05a792809a1f6eb74e (diff) | |
download | ruby-9cd0b20620fdf1ff457fca5a140053d0c2c4bbde.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 |