Re: Module External Configuration

2011-06-21 Thread Jason Funk
One last question about shared memory... I have my configuration now being loaded successfully into a shared memory segment.. now my problem is that someone could change the config so that the resulting structure wouldn't fit in the shared memory segment. Is it possible to in the child replace my

Re: Module External Configuration

2011-06-21 Thread Joe Lewis
On Tue, 2011-06-21 at 16:26 -0500, Jason Funk wrote: One last question about shared memory... I have my configuration now being loaded successfully into a shared memory segment.. now my problem is that someone could change the config so that the resulting structure wouldn't fit in the

Re: Module External Configuration

2011-06-21 Thread Ben Noordhuis
On Tue, Jun 21, 2011 at 23:26, Jason Funk jasonlf...@gmail.com wrote: One last question about shared memory... I have my configuration now being loaded successfully into a shared memory segment.. now my problem is that someone could change the config so that the resulting structure wouldn't

Re: Module External Configuration

2011-06-21 Thread Sorin Manolache
On Tue, Jun 21, 2011 at 23:26, Jason Funk jasonlf...@gmail.com wrote: One last question about shared memory... I have my configuration now being loaded successfully into a shared memory segment.. now my problem is that someone could change the config so that the resulting structure wouldn't

Module External Configuration

2011-06-20 Thread Jason Funk
Hello, The module that I am writing has an external configuration file that it parses and loads into configuration when the server loads. Before every request it checks to see if the configuration file has been updated and if it has it reloads the configuration. The configuration should be shared

Re: Module External Configuration

2011-06-20 Thread Mike Meyer
On Mon, 20 Jun 2011 13:39:48 -0500 Jason Funk jasonlf...@gmail.com wrote: Hello, The module that I am writing has an external configuration file that it parses and loads into configuration when the server loads. Before every request it checks to see if the configuration file has been

Re: Module External Configuration

2011-06-20 Thread Neil McKee
In the mod-sflow implementation I have one thread responsible for reading in new configuration as it changes and writing it to a shared-memory area where the worker-processes/threads can pick it up whenever it changes. I don't know if that is the best way or not, but it's one data point for

Re: Module External Configuration

2011-06-20 Thread Jason Funk
I have moved my configuration over to shared memory (following mod_shm_counter as an example) and it conceptually seems to be working. I am storing a struct in the memory and members that share it's memory (such as the last mod time of the configuration file) persist over multiple children.

Re: Module External Configuration

2011-06-20 Thread Ben Noordhuis
On Mon, Jun 20, 2011 at 22:46, Jason Funk jasonlf...@gmail.com wrote: I have moved my configuration over to shared memory (following mod_shm_counter as an example) and it conceptually seems to be working. I am storing a struct in the memory and members that share it's memory (such as the last

Re: Module External Configuration

2011-06-20 Thread Sorin Manolache
On Mon, Jun 20, 2011 at 22:46, Jason Funk jasonlf...@gmail.com wrote: I have moved my configuration over to shared memory (following mod_shm_counter as an example) and it conceptually seems to be working. I am storing a struct in the memory and members that share it's memory (such as the last

Re: Module External Configuration

2011-06-20 Thread Nick Kew
On Mon, 20 Jun 2011 16:10:12 -0400 Mike Meyer m...@mired.org wrote: I assume that this is because a new process was spawned to handle a new request and the updated memory didn't get carried over (even though the pointer address didn't change...) A new process may be spawned from time to