1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

@ -195,5 +195,16 @@ class TestPTY < Test::Unit::TestCase
assert_nil(st1)
assert_equal(pid, st2.pid)
end
def test_cloexec
PTY.open {|m, s|
assert(m.close_on_exec?)
assert(s.close_on_exec?)
}
PTY.spawn(RUBY, '-e', '') {|r, w, pid|
assert(r.close_on_exec?)
assert(w.close_on_exec?)
}
end
end if defined? PTY