httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: pchild pool (Apache 1.3)
Date Tue, 29 Jan 2008 22:38:53 GMT
Ed Powell wrote:
> Problem is, I have no idea how to use this.  I suppose its more of a 
> problem of not knowing how to use pools for storing my own information.
> I could allocate sizeof(FILE) to the pchild pool, and I'll get a pointer 
> back, and store the file descriptor in there.  Great... now how do I 
> tell the rest of the module what that pointer is?  Just put in a "static 
> FILE *myfile;" line in the code?  Is that going to be multi-process 
> safe?  (I get the feeling I'm asking the wrong questions...)

You hit on the reason that apache 1.3 is abandoned.  EAPI solved this
with new field members.  Frontpage solved this with new field members.
 From those two modules alone, you have four different possible binary
compatibility types for third party modules.  Ick :)

Remember unix is a 1:1 process to worker model, so you can throw it in
a global.  Or on win32, it's a 1:1 thread to worker model, so if you
have one to a thread, each can be in a TLS global, or if you know you
are ok on thread safety, you can just put one into a process global.


View raw message