From: Brendan O'Dea Date: Thu, 28 Jun 2007 07:22:50 +0000 (+0000) Subject: propagate select error X-Git-Tag: 2.2.1-2fdn3.1~19^2^2~1^2~10 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/46e0772dfa48c9d710c90891dd5295d56bdd1363?hp=4a10d3188cd1895e571c35375c1722d1f61a198e propagate select error --- diff --git a/fake_epoll.h b/fake_epoll.h index b44f846..7983455 100644 --- a/fake_epoll.h +++ b/fake_epoll.h @@ -1,5 +1,5 @@ /* 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__ #define __FAKE_EPOLL_H__ @@ -150,6 +150,9 @@ static int epoll_wait(int epfd __attribute__ ((unused)), tp = 0; n = select(_epoll_fds, &r, &w, 0, tp); + if (n < 0) + return n; + if (n > maxevents) n = maxevents;