Project

General

Profile

« Previous | Next » 

Revision f9601903

Added by Misaki Shioi 12 months ago

Use rb_thread_fd_select instead of select(2) (#12292)

  • Use rb_thread_fd_select instead of select(2)

For fixing https://bugs.ruby-lang.org/issues/20932 .
TCPSocket.new, which internally uses select(2) for HEv2, can cause SEGV if the number of file descriptors exceeds FD_SETSIZE.
This change avoids that issue by replacing select(2) with rb_thread_fd_select, which is provided as part of Ruby's internal API.


This includes the following changes.

  • rb_thread_fd_select does not need common pipe