On Nov 23, 2007 9:44 AM, Marc Lehmann <[EMAIL PROTECTED]> wrote:

> On Wed, Nov 21, 2007 at 06:06:51PM +0100, Nicolas Favre-Félix <
> [EMAIL PROTECTED]> wrote:
> > I am trying to implement a server using a "pre-fork" design. It
>
[...]
> libevent doesn't support forking (unless you force it to use select or
> poll) and continue using it in the child.
>

That's actually what I'm doing at the moment, calling listen(), then fork().
Each child adds a callback for EV_READ on the socket and runs its event
loop.
It tries to accept() on it when the callback function is executed, and
handles the client. This has been tested quite heavily without problem...
Could there be one?

You might have luck with ignoring the parent event loop and create a new
> one in your child, at the expense of losing resources.
>

Thank you for your precisions. I don't have an event loop in the parent, so
this is not a problem.

> I'd like to integrate HTTP support - using evhttp.
this was my main question... Is it possible to give evhttp a bound socket to
monitor?
I checked http.c but couldn't find any exported function doing this. If this
isn't implemented, would it be OK to submit a patch to add this feature?

Thanks,

Nicolas
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to