[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Stop listening on http server when accept() returns Too Many Open Files



On Tue, Sep 21, 2010 at 8:37 AM, Simon Perreault
<simon.perreault@xxxxxxxxxxx> wrote:
> On 2010-09-21 08:15, W.C.A. Wijngaards wrote:
>> Perhaps you can get EPIPE "Broken Pipe" more easily; fork then kill that
>> process involved in the pipe, that sort of thing.
>
> I don't see EPIPE in the list of possible error codes for accept()...
>
> But it's true that other errors would be easier to trigger. Take
> EOPNOTSUPP for example. Create a UDP socket, receive some data on it
> (just write to it from a second socket), then create the econnlistener
> with it. Since the fd is ready for reading, accept() will be called and
> EOPNOTSUPP will be generated.

Good idea.  I did that one, using a TCP socket.

(merged your patch too.)

-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.