add test for close-on-exec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-11-03 11:15:15 +00:00
parent df6a0fe8bb
commit 88f1b8cf0c
5 changed files with 94 additions and 0 deletions

View file

@ -1323,4 +1323,11 @@ class TestProcess < Test::Unit::TestCase
end
end
end
def test_popen_cloexec
return unless defined? Fcntl::FD_CLOEXEC
IO.popen([RUBY, "-e", ""]) {|io|
assert(io.close_on_exec?)
}
end
end