httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: Module External Configuration
Date Tue, 21 Jun 2011 21:40:02 GMT
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 shared memory segment. Is it
> possible to in the child replace my current shared memory segment with a
> bigger one? I tried destroy()ing and then create()ing but that resulted in a
> segfault. Should it have worked? Is there a different way?
> Jason

segfaults are good indicators of pointers pointing to the wrong things.
It will work if you do it right.  Is your pointer to the shared memory
in shared memory?  Or do the clients have their own pointer that might
change if the data in shm changes location?

You might have to shm the pointer to a separate shm segment, and then
after reading in a new config, change the shm pointer to point to the
new one and destroy the old config.  Don't touch the pointer aside from
changing where it points to.

Joe Lewis

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message