waizi has asked for the wisdom of the Perl Monks concerning the following question:
i have q parent-process that forks some childs. Each child goes into an endless loop until he get the term-signal. This will break the endless-loop and the programm stops.
But if the child get the term-signal at this moment when he is in the http-request it comes back with an http-timeout.
Also if i use the USR1 signal.
Have someone any idear wich signal is not used by the HTTP-Modules?
Thanks waizi
my $exitflag = 1; $SIG{TERM} = sub { $exitflag = 0 }; while( $exitflag ) { my $ua = new LWP::UserAgent; $ua->agent("AgentName/0.1 " . $ua->agent); $ua->timeout(300); my $req = HTTP::Request->new(GET => $urlsafe); # # if the signal comes in this function, i get an timeout as result my $res = $ua->request($req); #... do something }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP-Module - signalhandler
by PodMaster (Abbot) on Jan 23, 2003 at 11:45 UTC |