Re: [Libevent-users] How to avoid calling bufferevent_write on a freed bev efficiently?

2012-02-09 Thread Wenliang Zhang
Hi, Nick, Thanks for your reply. It's very helpful. Thanks and Regards, Wenliang On Thu, Feb 9, 2012 at 12:12 AM, Nick Mathewson wrote: > On Wed, Feb 8, 2012 at 5:37 AM, Wenliang Zhang wrote: > > Hi, all, > > Personally, my first approach would be to do it with something closer > to a re

Re: [Libevent-users] [nicholas.marri...@gmail.com: libevent and invalid fds]

2012-02-09 Thread Nicholas Marriott
I'd be inclined to go with 3 too, it would be nice if all were consistent as can be in the long run to avoid similar problems later. It looks like NetBSD has returned EBADF here (sys_pipe.c:pipe_kqfilter) since 2002 but it's a pretty easy change, maybe they'd like to make it consistent. It sort of

Re: [Libevent-users] [nicholas.marri...@gmail.com: libevent and invalid fds]

2012-02-09 Thread Nick Mathewson
On Thu, Feb 9, 2012 at 3:37 PM, Frank Denis wrote: > Le Thu, Feb 09, 2012 at 03:23:32PM -0500, Nick Mathewson ecrivait : >> On Thu, Feb 9, 2012 at 4:32 AM, Nicholas Marriott >> I'm asking around; I'll let you know if anybody tells me they can test >> NetBSD. > > $ ./a > pipefd[0] = {4,5} > pipefd

Re: [Libevent-users] [nicholas.marri...@gmail.com: libevent and invalid fds]

2012-02-09 Thread Frank Denis
Le Thu, Feb 09, 2012 at 03:23:32PM -0500, Nick Mathewson ecrivait : > On Thu, Feb 9, 2012 at 4:32 AM, Nicholas Marriott > I'm asking around; I'll let you know if anybody tells me they can test NetBSD. $ ./a pipefd[0] = {4,5} pipefd[1] = {6,7} pipefd[2] = {8,9} pipefd[3] = {10,11} 1 events: 9: fi

Re: [Libevent-users] [nicholas.marri...@gmail.com: libevent and invalid fds]

2012-02-09 Thread Nick Mathewson
On Thu, Feb 9, 2012 at 4:32 AM, Nicholas Marriott wrote: > Ah, hmm... I've checked FreeBSD and it is the same, EPIPE, I don't have > a NetBSD box but I might be able to set one up tomorrow night if nobody > with one speaks up. I'm asking around; I'll let you know if anybody tells me they can test

Re: [Libevent-users] [nicholas.marri...@gmail.com: libevent and invalid fds]

2012-02-09 Thread Nicholas Marriott
Ah, hmm... I've checked FreeBSD and it is the same, EPIPE, I don't have a NetBSD box but I might be able to set one up tomorrow night if nobody with one speaks up. On Wed, Feb 08, 2012 at 09:16:41PM -0500, Nick Mathewson wrote: > On Wed, Feb 8, 2012 at 12:19 PM, Nicholas Marriott > wrote: > >