Re: Apache SAPI screwed up

From: Date: Sat, 08 Jul 2000 15:38:13 +0000
Subject: Re: Apache SAPI screwed up
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23869@lists.php.net to get a copy of this message
Zeev Suraski wrote: > > Ah. Apache changed it's behavior since adding the child exit hooks, and > no longer calls the shutdown hooks when a single server exits? If so, we > indeed have a bug. > No, apache 1.3.12 doesn't call the cleanup functions on child exit. > The bug should be solved by simply calling the shutdown hook on child > exit, in addition to calling it on the server shutdown. Generally, > there's no reason to get confused with the GINIT/GSHUTDOWN functions at > all; The fact we prepare a single process image, start it up, and then > Apache forks the already-prepared image is great, and is the quickest (and > IMHO the cleanest) way of doing things. We just need to ensure it also > cleans this process up on every exit. > At least the mm session module relies on the GSHUTDOWN function to free it's shared memory. Since GSHUTDOWN is never called, you end up with two shared memory segements after apache's two round startup. Even using some global variable to check if the memory has already been allocated won't work in a DSO situation since apache reloads the modules between the two initialization runs. So we need at least the GSHUTDOWN handlers to be called in the main apache process. -Andreas

« previous php.dev (#23869) next »