android_system_core/libsysutils/src
Bernie Innocenti 0ad41cf3f4 SocketListener: use poll() instead of select()
FD_SET is limited to 1024 file descriptors in Linux, which causes
processes with too many open files or connections to crash:

  FORTIFY: FD_ISSET: file descriptor 1024 >= FD_SETSIZE 128

The fix we used elsewhere is replacing select() with poll(), but in the
case of SocketListener we additionally need to replace the SocketClient
list with a map indexed by fd in order to avoid quadratic behavior on
each poll() wakeup.

Bug: 79838856
Test: device boots and appears to work normally
Change-Id: I19ca4be675e9638104c0e7acf4a4bc62085e8ecd
2018-05-25 18:43:12 +09:00
..
FrameworkClient.cpp system/core Replace cutils/log.h with android/log.h 2016-09-30 12:47:05 -07:00
FrameworkCommand.cpp system/core: preparation to pull back interfaces from android/log.h 2016-10-20 08:11:39 -07:00
FrameworkListener.cpp Remove old LOG_EVENT_* code from libsysutils 2017-07-11 15:14:26 -07:00
NetlinkEvent.cpp Include iface index in the netlink event 2018-03-07 11:39:52 +09:00
NetlinkListener.cpp Remove old LOG_EVENT_* code from libsysutils 2017-07-11 15:14:26 -07:00
ServiceManager.cpp There's no longer a limit to property names. 2017-02-28 14:12:54 -08:00
SocketClient.cpp system/core: preparation to pull back interfaces from android/log.h 2016-10-20 08:11:39 -07:00
SocketListener.cpp SocketListener: use poll() instead of select() 2018-05-25 18:43:12 +09:00