From: David Goulet Date: Fri, 9 Sep 2011 18:43:13 +0000 (-0400) Subject: Add poll/epoll compat layer for session daemon X-Git-Tag: v2.0-pre13~5 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=5eb91c9837a7b379a74e99358f0f9fb10011ef74;hp=5eb91c9837a7b379a74e99358f0f9fb10011ef74 Add poll/epoll compat layer for session daemon This is a big modification of the session daemon code base. Every thread is monitoring file descriptors using a poll set. This commit adds a compat wrapper for the use of poll(2) or epoll(7) determined at compile time on if the epoll API is available. Since epoll(7) is Linux specific, the poll(2) fallback is necessary for portability. By default, epoll(7) will be used having the --enable-epoll default to yes. To use the poll(2) API, simply run with --disable-epoll when running configure. With this implementation, some fixes are also introduced. * Two missing notification to the consumer when the default channel is created. * Memory and socket file descriptor leak when connect()/close() is done by the daemon alive check of the lttngctl API. * Root check (UID=0) on cleanup() before removing LTTNG_RUNDIR. * Comments here and there. At this commit, tests were made on the CPU hot plug feature, multiple UST registration at the same time and git tree tests. All passed for poll(2) and epoll(7) implementation. Signed-off-by: David Goulet ---