epoll_pwait

fnint epoll_pwait(int epfd, epoll_event * events, int maxevents, int timeout, const sigset_t * ss)

Wait for events on an epoll instance

Parameters

epfdan epoll file descriptor instance
eventsa buffer that will contain triggered events
maxeventsthe maximum number of events to be returned ( usually size of "events" )
timeoutspecifies the maximum wait time in milliseconds (-1 == infinite)
ssa signal set. May be specified as null, in which case epoll_pwait() is equivalent to epoll_wait().

Returns

the number of triggered events returned in "events" buffer. Or -1 in

case of error with the "errno" variable set to the specific error code.