SVN: toys/fun/rsget.pl

sparky sparky at pld-linux.org
Fri Jan 9 14:40:38 CET 2009


Author: sparky
Date: Fri Jan  9 14:40:37 2009
New Revision: 10060

Modified:
   toys/fun/rsget.pl
Log:
- prevent zombies


Modified: toys/fun/rsget.pl
==============================================================================
--- toys/fun/rsget.pl	(original)
+++ toys/fun/rsget.pl	Fri Jan  9 14:40:37 2009
@@ -6,7 +6,7 @@
 =item TODO:
 - removing URI from list should stop download
 - new URI higher in the list should replace any connection
-  to the same network is still in the wait stage
+  to the same network if still in the wait stage
 =cut
 use strict;
 use warnings;
@@ -14,6 +14,7 @@
 
 my $checklist = 1;
 my %gotlist;
+$SIG{CHLD} = "IGNORE";
 
 package Line; # {{{
 use Term::Size;
@@ -970,6 +971,9 @@
 	$self->print("starting......");
 	$self->{referer} = $url;
 
+	if ( $body =~ /The file you are trying to access is temporarily unavailable/ ) {
+		return $self->error( "file temporarily unavailable" );
+	}
 	my %search = (
 		captcha_img => qr#<img src="(/capgen\.php\?[0-9a-f]+)"#,
 		action => qr#<form method="POST" action="(.*?)"#,


More information about the pld-cvs-commit mailing list