Hi , I am a beginner to epoll usage . The following is a sample code I have . #include <sys/epoll.h> #include "inet.h" #include <errno.h> extern int errno ; main(argc, argv) int argc; char *argv[]; { int sockfd, newsockfd, clilen, childpid; struct sockaddr_in cli_addr, serv_addr; pname = argv[0]; int pollfd = epoll_create(10); /* * Open a TCP socket (an Internet stream socket). */ if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) perror("socket failed"); struct epoll_event ev; ev.events = EPOLLIN | EPOLLET ; ev.data.fd = sockfd; int ret = epoll_ctl(pollfd, EPOLL_CTL_ADD, sockfd , &ev); /* * Bind our local address so that the client can send to us. */ bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); serv_addr.sin_port = htons(SERV_TCP_PORT); if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) perror("bind:"); listen(sockfd, 5); for ( ; ; ) { /* Wait for a connection from a client process. * This is an example of a concurrent server. */ struct epoll_event *events ; errno = 0 ; int ret = epoll_wait(pollfd , events , 10 , -1 ) ; if(ret > 0 ) { printf("yeah...epoll_wait worked \n"); } else if ( ret <0 ) { printf("errno is %d\n" , errno ) ; perror("epoll_wait:"); } clilen = sizeof(cli_addr); newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen); if (newsockfd < 0) perror("accept:"); The epoll_wait consistently returns a EFAULT error . I am using a RedHat Linux kernel version 2.6.5-1.358 . The same epoll_wait works fine for a keyboard fd . Is there a configuration issue or am I missing something . TIA , Simha. - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html