SVN: toys/rsget.pl/RSGet: Dispatch.pm Main.pm

sparky sparky at pld-linux.org
Tue Dec 7 12:26:57 CET 2010


Author: sparky
Date: Tue Dec  7 12:26:56 2010
New Revision: 11972

Modified:
   toys/rsget.pl/RSGet/Dispatch.pm
   toys/rsget.pl/RSGet/Main.pm
Log:
- SIGUSR1 is no more: send SIGUSR2 twice to restart immediately


Modified: toys/rsget.pl/RSGet/Dispatch.pm
==============================================================================
--- toys/rsget.pl/RSGet/Dispatch.pm	(original)
+++ toys/rsget.pl/RSGet/Dispatch.pm	Tue Dec  7 12:26:56 2010
@@ -309,9 +309,14 @@
 
 sub soft_restart
 {
-	$soft_restart = 1;
-	new RSGet::Line( "NOTICE: ", "rsget.pl will restart after finishing all current downloads" );
-	RSGet::FileList::update();
+	if ( $soft_restart ) {
+		RSGet::Main::restart();
+	} else {
+		$soft_restart = 1;
+		new RSGet::Line( "NOTICE: ", "rsget.pl will restart after finishing all current downloads" );
+		new RSGet::Line( "NOTICE: ", "send SIGUSR2 again to restart now" );
+		RSGet::FileList::update();
+	}
 }
 
 $SIG{USR2} = \&soft_restart;

Modified: toys/rsget.pl/RSGet/Main.pm
==============================================================================
--- toys/rsget.pl/RSGet/Main.pm	(original)
+++ toys/rsget.pl/RSGet/Main.pm	Tue Dec  7 12:26:56 2010
@@ -184,8 +184,6 @@
 	}
 }
 
-$SIG{USR1} = \&restart;
-
 sub check_settings
 {
 	my $settings = shift;


More information about the pld-cvs-commit mailing list