diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-17 05:56:07 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-17 05:56:07 +0000 |
commit | 4148b8846521f6cdbe35bc79a63e0512f65fe346 (patch) | |
tree | fe6e88a33e929ca7f3f73d12ff7049aa5bd16487 /defs | |
parent | ba42dd2b3241b50292ef1a952490209f13a6ec36 (diff) | |
download | ruby-4148b8846521f6cdbe35bc79a63e0512f65fe346.tar.gz |
ext/socket/init.c: use SOCK_NONBLOCK if available
This saves a system call by allowing us to use SOCK_NONBLOCK in
Linux when accept4 is available.
Note: I do not agree accept_nonblock should always make accepted
sockets non-blocking, and will propose a future API to allow
controlling whether accepted sockets are non-blocking or not
regardless of how they were created.
* ext/socket/init.c (cloexec_accept): support nonblock flag and
use SOCK_NONBLOCK if possible
* ext/socket/init.c (rsock_s_accept_nonblock): update cloexec_accept call
* ext/socket/init.c (accept_blocking): ditto for blocking
* test/socket/test_nonblock.rb: check nonblock? on accepted socket
[Feature #11138]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defs')
0 files changed, 0 insertions, 0 deletions