platform_system_core/libsysutils/include/sysutils
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.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
FrameworkCommand.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
FrameworkListener.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
List.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
NetlinkEvent.h Stop depending on libnl. 2017-10-05 14:56:44 +09:00
NetlinkListener.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
ServiceManager.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
SocketClient.h SocketListener: use poll() instead of select() 2018-05-25 18:43:12 +09:00
SocketClientCommand.h Exporting C++ headers from system/core 2017-01-24 22:51:36 +00:00
SocketListener.h SocketListener: use poll() instead of select() 2018-05-25 18:43:12 +09:00