Issue #1291 has been updated by Motohiro KOSAKI.

File 0001-O_CLOEXEC.patch added

Sure. This is linux specific feature. and I attached the proposal patch.

test way:

test.rb
--------------------------
open("foo", File::CREAT|File::RDWR|File::CLOEXEC, 0644)

strace -e open ruby test.rb
-------------------------------
(snip)
open("./test.rb", O_RDONLY)             = 3
open("foo", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 3


btw, glibc fopen(3) has "e" mode extention. It mean fopen("foo", "r+e") is equivalent
open("foo", O_RDWR|O_CLOEXEC). but I don't change mode spec of File::open, because
I don't think this is enough widly used nor enough widly known from people.

thanks.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/1291

----------------------------------------
http://redmine.ruby-lang.org