From: Mathieu Desnoyers Date: Thu, 16 May 2019 19:08:52 +0000 (-0400) Subject: sessiond: use epoll()/poll() instead of select() X-Git-Tag: v2.12.0-rc1~452 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=2d54bfb67f451a491c8cdfb6f6caea3981dc21a8;hp=2d54bfb67f451a491c8cdfb6f6caea3981dc21a8 sessiond: use epoll()/poll() instead of select() The select(2) system call is an ancient ABI limited to processes containing at most FD_SETSIZE file descriptors overall (typically 1024). This select call will fail if the target file descriptor is above FD_SETSIZE in a session daemon containing many file descriptors. This is unlikely to happen in normal use given than sessiond_init_thread_quit_pipe() is called early by main(). Odd scenarios could trigger this, for instance if the parent process leaves a large number of file descriptors open, or if a library which allocates file descriptors is LD_PRELOADed with the sessiond. Never use select, use the lttng epoll/poll wrapper instead. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau ---