summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--io.c4
-rw-r--r--test/ruby/test_io.rb51
3 files changed, 0 insertions, 70 deletions
diff --git a/ChangeLog b/ChangeLog
index 2476f2460a..48efd6855f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -111,10 +111,6 @@ Wed May 18 03:03:07 2011 Eric Hodel <drbrain@segment7.net>
* lib/singleton.rb: Improve documentation. Patch by Pete Higgins.
[Ruby 1.9 - Bug #4709]
-Wed May 18 01:02:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): add null check.
-
Tue May 17 21:24:04 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_mutex_lock): remove remove_signal_thread_list() call.
@@ -794,11 +790,6 @@ Fri May 6 14:25:53 2011 Tinco Andringa <mail@tinco.nl>
* ext/syck/rubyext.c (mktime_do): YAML.load time correctly parse
usecs smaller than 1 fixes #4571
-Thu May 5 23:08:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (TestIO#test_O_CLOEXEC): fix false positive
- detection.
-
Thu May 5 22:23:34 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread_pthread.c (native_mutex_reinitialize_atfork): removed
@@ -839,12 +830,6 @@ Wed May 4 21:11:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* benchmark/bm_io_select2.rb: reduce number of using file
descriptors. because gdb need some fds.
-Wed May 4 20:22:12 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (Init_IO): Added File::CLOEXEC constant.
- [ruby-core:22893] [Feature #1291]
- * test/ruby/test_io.rb (TestIO#test_o_cloexec): test for File::CLOEXEC.
-
Wed May 4 19:00:59 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_wait_for_single_fd): Fix wrong return value.
diff --git a/io.c b/io.c
index 925bfd4ea0..154a01943b 100644
--- a/io.c
+++ b/io.c
@@ -10573,10 +10573,6 @@ Init_IO(void)
/* Try to minimize cache effects of the I/O to and from this file. */
rb_file_const("DIRECT", INT2FIX(O_DIRECT));
#endif
-#ifdef O_CLOEXEC
- /* enable close-on-exec flag */
- rb_file_const("CLOEXEC", INT2FIX(O_CLOEXEC)); /* Linux, POSIX-2008. */
-#endif
sym_mode = ID2SYM(rb_intern("mode"));
sym_perm = ID2SYM(rb_intern("perm"));
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index f5f49f3efa..de55abbd41 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1238,57 +1238,6 @@ class TestIO < Test::Unit::TestCase
end
end
- def test_O_CLOEXEC
- if !defined? File::CLOEXEC
- return
- end
-
- mkcdtmpdir do
- ary = []
- begin
- 10.times {
- ary.concat IO.pipe
- }
-
- normal_file = Tempfile.new("normal_file");
- assert_equal(false, normal_file.close_on_exec?)
- cloexec_file = Tempfile.new("cloexec_file", :mode => File::CLOEXEC);
- assert_equal(true, cloexec_file.close_on_exec?)
- arg, argw = IO.pipe
- argw.puts normal_file.fileno
- argw.puts cloexec_file.fileno
- argw.flush
- ret, retw = IO.pipe
-
- while (e = ary.shift) != nil
- e.close
- end
-
- spawn("ruby", "-e", <<-'End', :close_others=>false, :in=>arg, :out=>retw)
- begin
- puts IO.for_fd(gets.to_i).fileno
- puts IO.for_fd(gets.to_i).fileno
- rescue
- puts "nofile"
- ensure
- exit
- end
- End
- retw.close
- Process.wait
- assert_equal("#{normal_file.fileno}\nnofile\n", ret.read)
- ensure
- while (e = ary.shift) != nil
- e.close
- end
- arg.close unless !arg || arg.closed?
- argw.close unless !argw || argw.closed?
- ret.close unless !ret || ret.closed?
- retw.close unless !retw || retw.closed?
- end
- end
- end
-
def test_close_security_error
with_pipe do |r, w|
assert_raise(SecurityError) do