Re: Process lifetime and hooks to use

2010-04-21 Thread alin vasile
why don't you create global variables and put there the configuration data? From: Some Guy teknos...@gmail.com To: modules-dev@httpd.apache.org Sent: Wed, April 21, 2010 1:44:06 AM Subject: Re: Process lifetime and hooks to use Thanks for your comments

Re: Process lifetime and hooks to use

2010-04-21 Thread Some Guy
: why don't you create global variables and put there the configuration data? From: Some Guy teknos...@gmail.com To: modules-dev@httpd.apache.org Sent: Wed, April 21, 2010 1:44:06 AM Subject: Re: Process lifetime and hooks to use Thanks for your comments

Re: Process lifetime and hooks to use

2010-04-21 Thread Some Guy
Guy teknos...@gmail.com To: modules-dev@httpd.apache.org Sent: Wed, April 21, 2010 3:37:47 PM Subject: Re: Process lifetime and hooks to use I need to get it from the configuration file. If the post config hook runs prior to the ap monitor hook, then that would work. But what memory is all

Re: Process lifetime and hooks to use

2010-04-21 Thread alin vasile
, REWRITELOG_MODE, p); From: alin vasile alinachegal...@yahoo.com To: modules-dev@httpd.apache.org Sent: Wed, April 21, 2010 5:22:32 PM Subject: Re: Process lifetime and hooks to use you can access the config in the child process too

Re: Process lifetime and hooks to use

2010-04-20 Thread Some Guy
: Some Guy teknos...@gmail.com To: modules-dev@httpd.apache.org Sent: Mon, April 19, 2010 3:04:02 PM Subject: Re: Process lifetime and hooks to use I think my understanding of the monitor hook is fine. I can just use the passed in pool as my context and use the userdata_set/get APIs as I

Re: Process lifetime and hooks to use

2010-04-19 Thread Some Guy
, Apr 19, 2010 at 1:41 AM, alin vasile alinachegal...@yahoo.comwrote: It depends what you want to do in this hook. --- On Sun, 4/18/10, Some Guy teknos...@gmail.com wrote: From: Some Guy teknos...@gmail.com Subject: Re: Process lifetime and hooks to use To: modules-dev@httpd.apache.org Date

Re: Process lifetime and hooks to use

2010-04-19 Thread alin vasile
comments inline From: Some Guy teknos...@gmail.com To: modules-dev@httpd.apache.org Sent: Mon, April 19, 2010 3:04:02 PM Subject: Re: Process lifetime and hooks to use I think my understanding of the monitor hook is fine. I can just use the passed in pool

Re: Process lifetime and hooks to use

2010-04-18 Thread alin vasile
the monitor hook gets only a pointer to an apr_pool_t structure. From: Some Guy teknos...@gmail.com To: modules-dev@httpd.apache.org Sent: Sat, April 17, 2010 4:24:18 PM Subject: Re: Process lifetime and hooks to use Thank you for your pointers. The monitor

Re: Process lifetime and hooks to use

2010-04-18 Thread William A. Rowe Jr.
On 4/18/2010 2:34 AM, alin vasile wrote: the monitor hook gets only a pointer to an apr_pool_t structure. Take a look at apr_pool_data_* API's, that should provide you all of the context and persistence you need. You will never see anything about servers, connections or requests because this is

Re: Process lifetime and hooks to use

2010-04-18 Thread Some Guy
Ah great. I know what I should do with that. Any insight on the differences in MPMs and what to watch out for? On Sun, Apr 18, 2010 at 12:22 PM, William A. Rowe Jr. wr...@rowe-clan.netwrote: On 4/18/2010 2:34 AM, alin vasile wrote: the monitor hook gets only a pointer to an apr_pool_t

Re: Process lifetime and hooks to use

2010-04-18 Thread alin vasile
It depends what you want to do in this hook. --- On Sun, 4/18/10, Some Guy teknos...@gmail.com wrote: From: Some Guy teknos...@gmail.com Subject: Re: Process lifetime and hooks to use To: modules-dev@httpd.apache.org Date: Sunday, April 18, 2010, 5:51 PM Ah great.  I know what I should do

Fwd: Process lifetime and hooks to use

2010-04-17 Thread Nick Kew
My reply seems to be lost in the ether ... try again. Begin forwarded message: On 16 Apr 2010, at 20:51, Some Guy wrote: Hi all, I would like to develop a module that periodically needs to fetch a file from a remote site and update some data used by the child processes. Is it safe to

Re: Fwd: Process lifetime and hooks to use

2010-04-17 Thread alin vasile
Hi Nick, Is ap_hook_monitor available in httpd 2.2.15? Thanks, Alin From: Nick Kew n...@apache.org To: modules-dev@httpd.apache.org Sent: Sat, April 17, 2010 12:10:46 PM Subject: Fwd: Process lifetime and hooks to use My reply seems to be lost

Re: Process lifetime and hooks to use

2010-04-17 Thread Nick Kew
On 17 Apr 2010, at 11:33, alin vasile wrote: I discovered that it is :) Any idea how would I retrieve in this hook the module config structure? It seems it is not possible, as the only argument in the handler is a apr_pool_t structure. It's in the parent process, which is

Re: Process lifetime and hooks to use

2010-04-17 Thread Some Guy
Thank you for your pointers. The monitor hook seems pretty useful and exactly what I want. From this example http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/examples/mod_example_hooks.c it seems the hook is passed a server_rec - is this the main server? If I have to for some reason

Process lifetime and hooks to use

2010-04-16 Thread Some Guy
Hi all, I would like to develop a module that periodically needs to fetch a file from a remote site and update some data used by the child processes. Is it safe to create this thread in the post config hook? I would like to do something like: Global thread fetches a file, and loads content

Re: Process lifetime and hooks to use

2010-04-16 Thread alin vasile
To: modules-dev@httpd.apache.org Sent: Fri, April 16, 2010 10:51:40 PM Subject: Process lifetime and hooks to use Hi all, I would like to develop a module that periodically needs to fetch a file from a remote site and update some data used by the child processes. Is it safe to create this thread