From: Motohiro KOSAKI Date: 2010-03-26T23:42:12+09:00 Subject: [ruby-core:29038] [Feature #1291] O_CLOEXEC flag missing for Kernel::open 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