apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <p...@querna.org>
Subject Re: using a pollset after apr_proc_detach on BSD
Date Mon, 14 Dec 2009 08:21:52 GMT
On Sat, Dec 12, 2009 at 5:53 AM, Daniel Pocock <daniel@pocock.com.au> wrote:
>
>
>
> Hi,
>
> There have been some discussions recently on the Ganglia list about the use
> of a pollset that was created before a call to apr_proc_detach
>
> On BSD platforms, we find the kqueue style pollsets are not valid after
> fork().  On other platforms, or if kqueue is disabled when compiling apr,
> the pollsets do remain valid.
>
> Can anyone make any comment on this issue?  We are keen to have
> initialization tasks completed before forking, so that if initialization
> fails, the caller will see the non-zero exit status.
>
> Here is a link to the thread on ganglia-developers, although I hope the
> description above captures all the main points:
>
> http://www.mail-archive.com/ganglia-general@lists.sourceforge.net/msg05251.html

Its a flaw in the pollset implementation.  I think we should fix it.

I believe epoll backend has the same problem. The libev library
documents several of these edge cases related to fork() and event
libraries.

-Paul

Mime
View raw message