/*
 * epoll
 */

#include <sys/epoll.h>
#include <unistd.h>
#include <fcntl.h>

int main(void)
{
	int efd = epoll_create1(0);
	int fd = open("/dev/null", O_RDONLY);
	if (efd >= 0 && fd >= 0) {
		struct epoll_event ev = {.events = EPOLLIN};
		ev.data.fd = fd;
		epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ev);
		close(fd);
		close(efd);
	}
	return 0;
}
