*/
#ifdef HAVE_EPOLL
#include <sys/epoll.h>
+#include <stdio.h>
/* See man epoll(7) for this define path */
#define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
*/
static inline void lttng_poll_clean(struct lttng_poll_event *events)
{
+ int ret;
+
if (events) {
- close(events->epfd);
+ ret = close(events->epfd);
+ if (ret) {
+ perror("close");
+ }
__lttng_poll_free((void *) events->events);
}
}
LPOLLRDBAND = POLLRDBAND,
LPOLLWRNORM = POLLWRNORM,
LPOLLWRBAND = POLLWRBAND,
-#if __linux__
LPOLLMSG = POLLMSG,
- LPOLLRDHUP = POLLRDHUP,
-#elif __FreeBSD__
- LPOLLMSG = 0,
- LPOLLRDHUP = 0,
-#endif /* __linux__ */
LPOLLERR = POLLERR,
LPOLLHUP = POLLHUP | POLLNVAL,
+ LPOLLRDHUP = POLLRDHUP,
/* Close on exec feature does not exist for poll(2) */
LTTNG_CLOEXEC = 0xdead,
};