ruby/ext/socket
normal 8ff35b816a 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
2015-05-17 05:56:07 +00:00
..
lib stdlib: use IO#wait_*able instead of IO.select when possible 2015-05-06 20:30:43 +00:00
.document * ext/socket/.document: Add ifaddr.c. 2013-05-14 14:48:00 +00:00
addrinfo.h * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ancdata.c ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard 2015-05-08 22:31:02 +00:00
basicsocket.c * ext/socket/basicsocket.c, ext/socket/sockssocket.c: 2014-12-07 10:40:27 +00:00
constants.c use frozen string of symbols 2015-04-14 03:31:28 +00:00
depend Update dependencies. 2014-12-19 13:34:54 +00:00
extconf.rb * ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state, 2015-03-25 08:10:14 +00:00
getaddrinfo.c getaddrinfo.c: GHOST vulnerability check 2015-02-08 04:04:32 +00:00
getnameinfo.c {getaddrinfo,getnameinfo}.c: fix for old platforms 2013-05-03 04:35:37 +00:00
ifaddr.c ifaddr.c: wrapper object before alloc 2015-05-16 12:57:17 +00:00
init.c ext/socket/init.c: use SOCK_NONBLOCK if available 2015-05-17 05:56:07 +00:00
ipsocket.c ipsocket.c: fix merge miss 2015-04-30 07:45:36 +00:00
mkconstants.rb * ext/socket/mkconstants.rb: More constants 2014-05-23 20:54:40 +00:00
option.c * ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state, 2015-03-25 08:10:14 +00:00
raddrinfo.c raddrinfo.c: fix memory leak 2015-04-08 23:24:10 +00:00
rubysocket.h accept_nonblock supports "exception: false" 2015-03-12 03:03:04 +00:00
socket.c connect_nonblock(..., exception: false) does not raise EISCONN 2015-04-20 02:11:10 +00:00
sockport.h * ext/socket: Bypass getaddrinfo() if node and serv are numeric. 2014-02-19 10:37:43 +00:00
sockssocket.c * ext/socket/basicsocket.c, ext/socket/sockssocket.c: 2014-12-07 10:40:27 +00:00
tcpserver.c accept_nonblock supports "exception: false" 2015-03-12 03:03:04 +00:00
tcpsocket.c socket: ai_addrlen is socklen_t 2013-02-15 07:54:38 +00:00
udpsocket.c * ext/socket: Wrap struct addrinfo by struct rb_addrinfo. 2014-02-19 09:38:24 +00:00
unixserver.c accept_nonblock supports "exception: false" 2015-03-12 03:03:04 +00:00
unixsocket.c * ext/socket/unixsocket.c: [DOC] Fix example to render in HTML 2014-10-11 00:33:08 +00:00