aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/init.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-29 20:00:00 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-29 20:00:00 +0000
commit9d74d402e15008c10f80e67595cc861c89a1636b (patch)
tree71d73fd903c5047f889aedb1e0cdf98d59bc8175 /ext/socket/init.c
parentd7e3043463e7e138a4334b2173d6a3fbe4321e35 (diff)
downloadruby-9d74d402e15008c10f80e67595cc861c89a1636b.tar.gz
disable non-blocking pipes and sockets by default
There seems to be a compatibility problems with Rails + Rack::Deflater; so we revert this incompatibility. This effectively reverts r65922; but keeps the bugfixes to better support non-blocking sockets and pipes for future use. [Bug #15356] [Bug #14968] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/init.c')
-rw-r--r--ext/socket/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 9742dddec2..44d1506973 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -435,7 +435,7 @@ rsock_socket0(int domain, int type, int proto)
static int cloexec_state = -1; /* <0: unknown, 0: ignored, >0: working */
if (cloexec_state > 0) { /* common path, if SOCK_CLOEXEC is defined */
- ret = socket(domain, type|SOCK_CLOEXEC|SOCK_NONBLOCK, proto);
+ ret = socket(domain, type|SOCK_CLOEXEC|RSOCK_NONBLOCK_DEFAULT, proto);
if (ret >= 0) {
if (ret <= 2)
goto fix_cloexec;
@@ -443,7 +443,7 @@ rsock_socket0(int domain, int type, int proto)
}
}
else if (cloexec_state < 0) { /* usually runs once only for detection */
- ret = socket(domain, type|SOCK_CLOEXEC|SOCK_NONBLOCK, proto);
+ ret = socket(domain, type|SOCK_CLOEXEC|RSOCK_NONBLOCK_DEFAULT, proto);
if (ret >= 0) {
cloexec_state = rsock_detect_cloexec(ret);
if (cloexec_state == 0 || ret <= 2)