Short Version:

The file descriptors for socket pairs and/or pipes do not seem to function properly in libevent after a process fork on MacOS. The same code works fine in Linux. After registering an event and calling libevent_loop, I get a bad file descriptor message.

Slightly Longer Version:

Despite a lot of google searches, I haven't found any references to this problem, so I'm hoping somebody can help. We use libevent extensively, mostly on MacOS X 10.4 and Ubuntu Linux... it works great, using buffered events mostly. Incidentally, we are using bindings for OCAML but I think this is unrelated to the problem.

In two separate instances, we are forking processes and using socket pairs or pipes to communicate between them. It works great in Linux but fails on MacOS 10.4. The file descriptors seem to be fine from other perspectives (i.e. doing blocking read/write calls for communication is fine).

Long Version:

More details are available on request, but I'm hoping that this is a problem that somebody has seen before. It this likely incorrect usage on our part? or some type of bug on the Mac?

BTW, I've tried several different versions of libevent including 1.3d and up to 1.4.3.

I hope somebody can help, because we really like libevent but don't want to give up our nice mac development environments.

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

Reply via email to