> The examples are:
> * Start/Restart - when some heavy startup operation should be performed
> (e.g. a heavy XML parsing and preloading like someone posted awhile ago)

I still don't see a complete example.  if you're inside <Perl> in
httpd.conf, then you know the server is starting (or restarting), when do
you need to know the difference between starting/restarting?

> * Stopping - I wrote this runaway watchdog and had to make it a standalone
> program which has no idea whether the server is running. I wanted the code
> to be aware of the server status and spawn from the startup file, and kill
> it when the server is stopping... I guess I can provide more cleanup
> scenarios too. 

can't you just use PerlChildExitHandler?  actually, for this case,
Apache::SubProcess could be changed so it can be called at startup, tied
to the server memory pool, then it would be cleaned up for you when the
pool is destroyed during shutdown.

Reply via email to