On Tue, Feb 10, 2009 at 19:11, Joe Lewis <j...@joe-lewis.com> wrote: > With your last post (the creation), it looks like you understand it well. > Are you only creating one process? For example, run it with a -X parameter > (to prevent fork()ing) so you can ensure that you aren't working across > processes? Printing the PID along with the %d? Is the %d in the handler > always the same? > > Joe >
So I was in the process of creating a simple test module when I discovered the problem had gone away (both in the test module and in the module I am developing.) I did some more digging and discovered that it was a configuration that is actually causing the problem. In my virtual host definition, I have this: # SetHandler test SetHandler mymod MyModConfig /var/www/file If I comment out that last line, I get a relatively simple configuration sequence when Apache first boots (yes, this is all run with -X). cfg is the address of the module_config variable. server/path is the address of either the server_rec or the path variable pass into the callback. sudo APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data /usr/sbin/apache2 -X server_config {pid: 13878 cfg:0x2b7c26e32ac0 server: 0x2b7c26db4568} dir_config {pid: 13878 cfg:0x2b7c26e32ad8 path: (null)} server_config {pid: 13878 cfg:0x2b7c26e399d0 server: 0x2b7c26db1968} dir_config {pid: 13878 cfg:0x2b7c26e399e8 path: (null)} child_init {pid: 13878 cfg:0x2b7c26e399d0 server: 0x2b7c26db1968} create new <-- this is my code creating the resources that it needs for the process handler {pid: 13878 cfg:0x2b7c26e399d0 server: 0x2b7c2fa881b8} <-- notice the cfg/server addresses are the same as the line above When I run with the line uncommented, I get the following: server_config {pid: 13979 cfg:0x2b2cf82ebac0 server: 0x2b2cf826d568} dir_config {pid: 13979 cfg:0x2b2cf82ebad8 path: (null)} dir_config {pid: 13979 cfg:0x2b2d00f415c8 path: (null)} server_config {pid: 13979 cfg:0x2b2d00f415e0 server: 0x2b2d00f3f1a8} mymodconfig {pid: 13979 cfg:0x2b2d00f415c8 cmd_parms: 0x7fffb2ad90c0} <-- call to process the config server_config {pid: 13979 cfg:0x2b2cf82f29d0 server: 0x2b2cf826a968} dir_config {pid: 13979 cfg:0x2b2cf82f29e8 path: (null)} dir_config {pid: 13979 cfg:0x2b2d00f435d8 path: (null)} server_config {pid: 13979 cfg:0x2b2d00f435f0 server: 0x2b2d00f411b8} mymodconnfig {pid: 13979 cfg:0x2b2d00f435d8 cmd_parms: 0x7fffb2ad90c0} <-- call to process the config again child_init {pid: 13979 cfg:0x2b2cf82f29d0 server: 0x2b2cf826a968} create new <-- creating the resources where it should handler {pid: 13979 cfg:0x2b2d00f7aff0 server: 0x2b2d00f411b8} <-- notice the cfg/server addresses are different than the line above create new <-- thinks the resources have not been created, so doing it again I tried defining a merge callback for both the server level and the directory level, but that doesn't seem to change anything. -dave man...@gmail.com