You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Issac Goldstand <ma...@beamartyr.net> on 2006/11/29 10:08:01 UTC

Storing per-child-process data

Hi all,
  I'm trying to create some data-structures on a per-child-process
basis.  I do the initialization in the child_init hook, and register a
cleanup for the pchild pool to clean it up.  However, I'm unsure as to
where the best place to stash the data is (request-phase handlers will
need it).  My initial thought was somewhere attached to the underlying
process_rec; I haven't found much documentation about process_rec, but
from what I tried to glimmer from http_main.c, it looks like process_rec
will always point to the parent httpd process, which doesn't help.  I'm
not sure how I'd find the child-process pool that I get in child_init
from request handlers, or I'd just attach user-data to it.  I feel like
there's probably a simple and straightforward solution that I'm not
thinking about...

Has someone done something similar?

  Issac