diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-29 05:27:32 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-29 05:27:32 +0000 |
commit | baa2d74daea424a7e28cf659e9d3a1fd05a7ff3e (patch) | |
tree | 0ed1ce12498cfed595ff304d3b4273ef9397d9e4 /io.c | |
parent | da74bc75523ef4054030e5f3cf4aac3e9bfe8715 (diff) | |
download | ruby-baa2d74daea424a7e28cf659e9d3a1fd05a7ff3e.tar.gz |
* io.c (rb_cloexec_open): use O_CLOEXEC if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -191,6 +191,9 @@ int rb_cloexec_open(const char *pathname, int flags, mode_t mode) { int ret; +#ifdef O_CLOEXEC + flags |= O_CLOEXEC; +#endif ret = open(pathname, flags, mode); if (ret == -1) return -1; fd_set_cloexec(ret); |