aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-03 11:15:15 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-03 11:15:15 +0000
commit88f1b8cf0c286d5a499d0832cde5ff6be4105d89 (patch)
treede55d3ce3930d527ccd672ed2cb58b92567dd3d0 /test/ruby/test_process.rb
parentdf6a0fe8bb0d41634689af8dcbee2c3e5eed4818 (diff)
downloadruby-88f1b8cf0c286d5a499d0832cde5ff6be4105d89.tar.gz
add test for close-on-exec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 5c05a47af5..a731dee99d 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -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