propagate select error
This commit is contained in:
parent
4a10d3188c
commit
46e0772dfa
1 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
/* kludge up some limited epoll semantics using select for 2.4 kernels */
|
/* kludge up some limited epoll semantics using select for 2.4 kernels */
|
||||||
/* $Id: fake_epoll.h,v 1.1 2005-06-04 15:42:35 bodea Exp $ */
|
/* $Id: fake_epoll.h,v 1.2 2007-06-28 07:22:50 bodea Exp $ */
|
||||||
|
|
||||||
#ifndef __FAKE_EPOLL_H__
|
#ifndef __FAKE_EPOLL_H__
|
||||||
#define __FAKE_EPOLL_H__
|
#define __FAKE_EPOLL_H__
|
||||||
|
|
@ -150,6 +150,9 @@ static int epoll_wait(int epfd __attribute__ ((unused)),
|
||||||
tp = 0;
|
tp = 0;
|
||||||
|
|
||||||
n = select(_epoll_fds, &r, &w, 0, tp);
|
n = select(_epoll_fds, &r, &w, 0, tp);
|
||||||
|
if (n < 0)
|
||||||
|
return n;
|
||||||
|
|
||||||
if (n > maxevents)
|
if (n > maxevents)
|
||||||
n = maxevents;
|
n = maxevents;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue