1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/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
..
test_addrinfo.rb test_addrinfo.rb: relax memory usage criterion 2015-04-10 01:02:55 +00:00
test_ancdata.rb
test_basicsocket.rb * io.c (rb_io_close_m): Don't raise when the IO object is closed. 2015-01-15 15:26:03 +00:00
test_nonblock.rb ext/socket/init.c: use SOCK_NONBLOCK if available 2015-05-17 05:56:07 +00:00
test_socket.rb * ext/socket/unixsocket.c (rsock_init_unixsock): Open a socket 2014-05-28 15:42:09 +00:00
test_sockopt.rb * ext/socket/option.c: Use "int" for IP_MULTICAST_LOOP and 2014-01-20 19:32:03 +00:00
test_tcp.rb accept_nonblock supports "exception: false" 2015-03-12 03:03:04 +00:00
test_udp.rb * test/socket/test_udp.rb: Close sockets explicitly. 2013-06-26 03:09:54 +00:00
test_unix.rb accept_nonblock supports "exception: false" 2015-03-12 03:03:04 +00:00