Posted on 2005-08-14 07:48:54-07 by book in response to 880
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.

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.