platform_system_core/libsysutils
Bernie Innocenti ca76859aca 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, tests pass
Change-Id: I4a8f1804fa990d3db3a2c96b9acd60b2c7135950
2018-08-28 05:52:56 +09:00
..
include/sysutils SocketListener: use poll() instead of select() 2018-08-28 05:52:56 +09:00
src SocketListener: use poll() instead of select() 2018-08-28 05:52:56 +09:00
Android.bp libsysutils: add some rudimentary tests 2018-08-28 05:52:48 +09:00
EventLogTags.logtags Add prefx to netlink failure and dispatchCommand overflow logs. 2014-04-29 13:16:26 -07:00