ruby/ext/socket
Koichi Sasada 3427a1679a
retry on cancelling of getaddrinfo (#11131)
When the registerred unblock function is called, it should retry
the cancelled blocking function if possible after checkints.

For example, `SIGCHLD` can cancel this method, but it should not
raise any exception if there is no trap handlers.

The following is repro-code:

```ruby
require 'socket'
PN = 10_000

1000000.times{
  p _1
  PN.times{
    fork{
      sleep rand(0.3)
    }
  }
  i = 0
  while i<PN
    cpid = Process.wait -1, Process::WNOHANG
    if cpid
      # p [i, cpid]
      i += 1
    end

    begin
      TCPServer.new(nil, 0).close
    rescue
      p $!
      exit!
    end
  end
}
```
2024-07-09 08:55:04 -07:00
..
lib Update BasicSocket#recv documentation on return value 2023-12-18 12:58:08 +01:00
.document
addrinfo.h Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
ancdata.c BasicSocket#recv* return nil rather than an empty packet 2023-08-30 10:07:18 +02:00
basicsocket.c Try nil as default for 'default timeout'. (#6509) 2022-10-08 14:02:34 +13:00
constants.c Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
depend Change the semantics of rb_postponed_job_register 2023-12-10 15:00:37 +09:00
extconf.rb [Bug #20208] Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoi… (#9791) 2024-03-14 16:27:05 +00:00
getaddrinfo.c Don't check for null pointer in calls to free 2023-06-30 09:13:31 -04:00
getnameinfo.c Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
ifaddr.c Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
init.c [DOC] Add Socket::ResolutionError documentation 2023-12-18 08:49:06 +09:00
ipsocket.c [Bug #20208] Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoi… (#9791) 2024-03-14 16:27:05 +00:00
mkconstants.rb [DOC] Stop unintentional references to builtin or standard names 2023-12-18 08:38:59 +09:00
option.c Add support for sockaddr_un on Windows. (#6513) 2022-11-17 14:50:25 -08:00
raddrinfo.c retry on cancelling of getaddrinfo (#11131) 2024-07-09 08:55:04 -07:00
rubysocket.h Rename rsock_raise_socket_error to rsock_raise_resolution_error 2023-11-30 13:27:19 +09:00
socket.c Rename rsock_raise_socket_error to rsock_raise_resolution_error 2023-11-30 13:27:19 +09:00
sockport.h
sockssocket.c Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
tcpserver.c Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
tcpsocket.c Expand tabs [ci skip] 2022-07-21 09:42:04 -07:00
udpsocket.c Partially revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls" 2023-12-12 20:05:21 +11:00
unixserver.c Add support for sockaddr_un on Windows. (#6513) 2022-11-17 14:50:25 -08:00
unixsocket.c fix typo in comments / autodoc 2023-01-16 08:00:03 +09:00