From: Motohiro KOSAKI Date: 2011-05-19T21:19:45+09:00 Subject: [ruby-core:36332] [Ruby 1.9 - Feature #1291][Assigned] O_CLOEXEC flag missing for Kernel::open Issue #1291 has been updated by Motohiro KOSAKI. Status changed from Closed to Assigned I've reverted r31430 today. because boron chkbuild test result says, An old linux kernel ignore O_CLOEXEC silently instead of return an error. It may lead to bring new security risk. So, we have to be pending it until finish to implement proper fallback logic. ---------------------------------------- Feature #1291: O_CLOEXEC flag missing for Kernel::open http://redmine.ruby-lang.org/issues/1291 Author: David Martin Status: Assigned Priority: Normal Assignee: Yukihiro Matsumoto Category: core Target version: 1.9.x =begin Linux has a the most useful O_CLOEXEC flag for open() that sets the CLOEXEC flag on the new file descriptor. You can currently set the CLOEXEC flag on an open file descriptor using IO::fcntl(), but note that this does *not* work in a multithreaded program: If one thread does open/fcntl while another does an exec, there is a race condition that could produce a file descriptor leak. The only safe way to open a file with the CLOEXEC flag set in general (as far as I know) is to use the O_CLOEXEC flag to open(). =end -- http://redmine.ruby-lang.org