Re: [Libevent-users] event_add fails with ENOENT when on epoll

2010-04-28 Thread Dan Kegel
On Tue, Apr 27, 2010 at 11:47 PM, Denis Bilenko wrote: > However, some libraries might close the socket while using it in > another thread. Heck, they might even do a blocking read, and THEN where would you be? i.e. if you're using nonblocking I/O, you're kind of an odd duck, and might have troub

Re: [Libevent-users] event_add fails with ENOENT when on epoll

2010-04-27 Thread Denis Bilenko
Thanks to everyone replied! The problem is that it's not always possible for me to delete the event before the socket is closed. In gevent, events are setup and deleted by the library, on behalf of the user. Suppose a user has created and connected a new gevent.socket.socket instance and called

Re: [Libevent-users] event_add fails with ENOENT when on epoll

2010-04-20 Thread William Ahern
On Tue, Apr 20, 2010 at 01:20:21PM -0400, Nick Mathewson wrote: > On Mon, Apr 19, 2010 at 11:24 PM, Denis Bilenko > wrote: > > Hi, > > > > I've run into an issue where event_add() fails with ENOENT. > > This happens when a socket reuses a descriptor that was recently > > closed and was used befor

Re: [Libevent-users] event_add fails with ENOENT when on epoll

2010-04-20 Thread Nick Mathewson
On Mon, Apr 19, 2010 at 11:24 PM, Denis Bilenko wrote: > Hi, > > I've run into an issue where event_add() fails with ENOENT. > This happens when a socket reuses a descriptor that was recently > closed and was used before with another event. > > The details are below. The question I have is - what

Re: [Libevent-users] event_add fails with ENOENT when on epoll

2010-04-20 Thread Jan Vidar Krey
On Tue, Apr 20, 2010 at 5:24 AM, Denis Bilenko wrote: > Hi, > > I've run into an issue where event_add() fails with ENOENT. > This happens when a socket reuses a descriptor that was recently > closed and was used before with another event. > > The details are below. The question I have is - what a

[Libevent-users] event_add fails with ENOENT when on epoll

2010-04-19 Thread Denis Bilenko
Hi, I've run into an issue where event_add() fails with ENOENT. This happens when a socket reuses a descriptor that was recently closed and was used before with another event. The details are below. The question I have is - what are the ways to work around this? Thanks, Denis. http://www.gevent.