Skip to content

Commit 54816d1

Browse files
committed
* 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
1 parent f0b021c commit 54816d1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sun Oct 30 10:47:20 2011 Nobuyoshi Nakada <[email protected]>
2+
3+
* io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
4+
dup3 succeeded.
5+
16
Sun Oct 30 09:58:48 2011 Tanaka Akira <[email protected]>
27

38
* io.c (rb_cloexec_dup): don't allocate standard file descriptors.

io.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ rb_cloexec_dup(int oldfd)
217217
try_fcntl = 0;
218218
ret = dup(oldfd);
219219
}
220+
else {
221+
return ret;
222+
}
220223
}
221224
else {
222225
ret = dup(oldfd);
@@ -246,6 +249,9 @@ rb_cloexec_dup2(int oldfd, int newfd)
246249
try_dup3 = 0;
247250
ret = dup2(oldfd, newfd);
248251
}
252+
else {
253+
return ret;
254+
}
249255
}
250256
else {
251257
ret = dup2(oldfd, newfd);

0 commit comments

Comments
 (0)