ruby-core

Mailing list archive

[#64517] Fw: Re: Ruby and Rails to become Apache Incubator Project — Tetsuya Kitahata <kitahata@99.alumni.u-tokyo.ac.jp>

What do you think? >> Ruby developers

13 messages 2014/08/23

[#64615] [ruby-trunk - Feature #10181] [Open] New method File.openat() — oss-ruby-lang@...

Issue #10181 has been reported by Technorama Ltd..

10 messages 2014/08/28
[#64616] Re: [ruby-trunk - Feature #10181] [Open] New method File.openat() — Eric Wong <normalperson@...> 2014/08/28

I like this feature.

[#64671] Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...>

Why this fix solve your problem?

9 messages 2014/08/30
[#64672] Re: Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...> 2014/08/30

(2014/08/30 8:50), SASADA Koichi wrote:

[ruby-core:64442] [ruby-trunk - Bug #9036] [PATCH] io.c: make IO#reopen("pathname") atomic for non-stdio

From: nagachika00@...
Date: 2014-08-18 13:34:41 UTC
List: ruby-core #64442
Issue #9036 has been updated by Tomoyuki Chikanaga.

Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONTNEED

r43373 was already included in ruby_2.1.

----------------------------------------
Bug #9036: [PATCH] io.c: make IO#reopen("pathname") atomic for non-stdio
https://bugs.ruby-lang.org/issues/9036#change-48393

* Author: Eric Wong
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.0dev (2013-10-20 trunk 43369) [x86_64-linux]
* Backport: 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONTNEED
----------------------------------------
Since rb_sysopen releases the GVL, calling close(fptr->fd) would
leave a window where accessing the file from another thread can hit
IOError on a closed stream

Instead, create a new, temporary FD via rb_sysopen and call
rb_cloexec_dup2 on it to atomically replace the file fptr->fd points
to.  This leaves no possible window where fptr->fd is invalid to
userspace (even for any threads running w/o GVL).

Without this patch, I need to maintain separate code paths for
atomically reopening (e.g. log rotation) std{in,out,err} vs
other files in a multithreaded application.


---Files--------------------------------
0001-io.c-make-IO-reopen-pathname-atomic.patch (1.47 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread