* io.c (rb_cloexec_dup2): don't set CLOEXEC for standard file
descriptors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
503e5c9750
commit
e745a03cfa
@ -1,3 +1,8 @@
|
||||
Sun Oct 30 08:29:51 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* io.c (rb_cloexec_dup2): don't set CLOEXEC for standard file
|
||||
descriptors.
|
||||
|
||||
Sun Oct 30 07:47:10 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* configure.in: check dup3.
|
||||
|
2
io.c
2
io.c
@ -234,7 +234,7 @@ rb_cloexec_dup2(int oldfd, int newfd)
|
||||
|
||||
#if defined(HAVE_DUP3) && defined(O_CLOEXEC)
|
||||
static int try_dup3 = 1;
|
||||
if (try_dup3) {
|
||||
if (2 < newfd && try_dup3) {
|
||||
ret = dup3(oldfd, newfd, O_CLOEXEC);
|
||||
/* dup3 is available since Linux 2.6.27. */
|
||||
if (ret == -1 && errno == ENOSYS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user