HTTP-Proxy - Re: Any way to tell HTTP::Proxy to end?

Posted on Sun Aug 14 10:48:54 2005 by book in response to 880 (See the whole thread of 4)
Re: Any way to tell HTTP::Proxy to end?

I'm stupid: HTTP::Proxy forks to start its children, and the main process never directly handles connections (except in very rare cases such as when too many child processes are started). So the only process that would be able to correctly handle that piece of information never actually sees it.

What you want is some way for the main process and its child process to communicate.

At this time, HTTP::Proxy has no built-in way to do this. :-( The main problem is that, when I'll have added this possibility, then I'll need to build some way for the main process to act on the received information (yet another hook somewhere).

You have another option: to create a global variable $main::PID (initialised to $$) and then have one of the child processes kill the parent whith the appropriate signal.

Write a response