X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fcompat-epoll.c;h=f4befa1a2a510fbdbb00825d87ad70f80e57200f;hb=811b2f150aae06ae0d211dc97416b847986798a3;hp=6259fd3895e46b9b27826944c1b7574b72b72ff3;hpb=bb346b1a1a6b58c835b0a246d5bf7e734c3d3904;p=lttng-tools.git diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c index 6259fd389..f4befa1a2 100644 --- a/src/common/compat/compat-epoll.c +++ b/src/common/compat/compat-epoll.c @@ -259,7 +259,15 @@ int compat_epoll_set_max_size(void) fd = open(COMPAT_EPOLL_PROC_PATH, O_RDONLY); if (fd < 0) { - retval = -1; + /* + * Failing on opening [1] is not an error per see. [1] was + * introduced in Linux 2.6.28 but epoll is available since + * 2.5.44. Hence, goto end and set a default value without + * setting an error return value. + * + * [1] /proc/sys/fs/epoll/max_user_watches + */ + retval = 0; goto end; }