summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-08 14:46:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-08 14:46:23 +0000
commit795c5f9b40e9b7ad35368a6a86c9c310a6c9a2d8 (patch)
tree6e2918b083ca5deb96d0620b933538eb89ee5596 /io.c
parentba1c1786d625a9477f029e153a5f10a7e9476319 (diff)
* process.c: don't check the availability of FD_CLOEXEC. It should
be available if fork() is available. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/io.c b/io.c
index ebc0a4bf3d..c398530241 100644
--- a/io.c
+++ b/io.c
@@ -5444,14 +5444,10 @@ rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
if (!NIL_P(noclose_fds) &&
RTEST(rb_hash_lookup(noclose_fds, INT2FIX(fd)))) /* async-signal-safe */
continue;
-#ifdef FD_CLOEXEC
ret = fcntl(fd, F_GETFD); /* async-signal-safe */
if (ret != -1 && !(ret & FD_CLOEXEC)) {
fcntl(fd, F_SETFD, ret|FD_CLOEXEC); /* async-signal-safe */
}
-#else
- ret = close(fd); /* async-signal-safe */
-#endif
#define CONTIGUOUS_CLOSED_FDS 20
if (ret != -1) {
if (max < fd + CONTIGUOUS_CLOSED_FDS)