summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb15
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