nobu / ruby-lang.org wrote: > I don't think it is possible to emulate `openat` family by FD in user space. > So adding `rb_cloexec_open2()` is a bad idea, IMHO, not only its name. Right, we cannot emulate `openat`; this needs kernel support. Also, File.new(dir) may not be portable enough for non-Linux. I think this should be based on Dir class instead (using Dir.open(dir), as discussed with Joel).