diff --git a/man7/epoll.7 b/man7/epoll.7 index 990fe85c7..e6b163e53 100644 --- a/man7/epoll.7 +++ b/man7/epoll.7 @@ -18,7 +18,7 @@ .\" .\" Davide Libenzi .\" -.TH EPOLL 7 2008-11-01 "Linux" "Linux Programmer's Manual" +.TH EPOLL 7 2008-11-04 "Linux" "Linux Programmer's Manual" .SH NAME epoll \- I/O event notification facility .SH SYNOPSIS @@ -220,6 +220,10 @@ if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == \-1) { for (;;) { nfds = epoll_wait(epollfd, events, MAX_EVENTS, \-1); + if (nfds == \-1) { + perror("epoll_pwait"); + exit(EXIT_FAILURE); + } for (n = 0; n < nfds; ++n) { if (events[n].data.fd == listen_sock) {