diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-08 14:46:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-08 14:46:23 +0000 |
commit | 795c5f9b40e9b7ad35368a6a86c9c310a6c9a2d8 (patch) | |
tree | 6e2918b083ca5deb96d0620b933538eb89ee5596 /io.c | |
parent | ba1c1786d625a9477f029e153a5f10a7e9476319 (diff) | |
download | ruby-795c5f9b40e9b7ad35368a6a86c9c310a6c9a2d8.tar.gz |
* 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.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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) |