I'm glad to see your book is now available!  I'll buy it right away.
Get your own copy now you guys!

http://www.prenhallprofessional.com/title/0132409674

On 10/10/06, Nick Kew <[EMAIL PROTECTED]> wrote:
On Tuesday 10 October 2006 16:43, Brian McQueen wrote:
> I am having a problem with keeping data in my apr_table_t.  During a
> request I obtain the server config structure, store something in there
> (some statistics which should have the scope of the life of the
> server), and then when the next request comes along, the data is gone!

The next request was handled by a different process.

> Here is how I'm initializing the table - here with a root pool:

The canonical way to create your pool would be to make a subpool
of pchild in a child_init hook.

> Neither of these lasts beyond the request, not even the one with
> static char strings:
>
> apr_table_set(server_config.approved_items, my_key, my_value);
> apr_table_set(server_config.approved_items, "key2", "value2");

These should be done under mutex, fwiw.

--
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.prenhallprofessional.com/title/0132409674

Reply via email to