On Mon, Oct 31, 2011 at 06:52:15PM +0100, Marc Lehmann wrote: > On Mon, Oct 31, 2011 at 11:10:56AM +0100, Ben Noordhuis <[email protected]> > wrote: > > stick on conventions like always checking for < 0 on error instead of <= 0, > > as, in fact, epoll_create returns -1 (< 0) on error, and never 0, as 0 is - > > in fact - a valid file descriptor. > > 0 is, in fact, not a valid file descriptor in this case, as it is stdin, > and an epoll fd is not having the properties stdin has - althoguh it'S > much betterto have an epoll fd there than, say, your shadow file :)
As this is not exactly the same as checking for a simple error, I think this line needs a comment why it checks for <= 0 and not < 0. -- Jonathan Neuschäfer _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
