mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
dup3 succeeded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f0b021c0ce
commit
54816d10eb
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Oct 30 10:47:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
|
||||
dup3 succeeded.
|
||||
|
||||
Sun Oct 30 09:58:48 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* io.c (rb_cloexec_dup): don't allocate standard file descriptors.
|
||||
|
|
6
io.c
6
io.c
|
@ -217,6 +217,9 @@ rb_cloexec_dup(int oldfd)
|
|||
try_fcntl = 0;
|
||||
ret = dup(oldfd);
|
||||
}
|
||||
else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ret = dup(oldfd);
|
||||
|
@ -246,6 +249,9 @@ rb_cloexec_dup2(int oldfd, int newfd)
|
|||
try_dup3 = 0;
|
||||
ret = dup2(oldfd, newfd);
|
||||
}
|
||||
else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ret = dup2(oldfd, newfd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue