sessiond: use epoll()/poll() instead of select()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 16 May 2019 19:08:52 +0000 (15:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 20:39:16 +0000 (16:39 -0400)
commit06d7785fbf2da7f6c8e02823aa2ae635ca674a8e
tree224016f8662cae810dc381a59b78e016e96379c3
parent06c7582761a17958e9b9df8fd17b22150c563f2b
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/lttng-sessiond.h
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/thread-utils.c
This page took 0.025552 seconds and 4 git commands to generate.