SVN: toys/rsget.pl/RSGet/Dispatch.pm
sparky
sparky at pld-linux.org
Mon Dec 20 15:13:03 CET 2010
Author: sparky
Date: Mon Dec 20 15:13:03 2010
New Revision: 12013
Modified:
toys/rsget.pl/RSGet/Dispatch.pm
Log:
- try to catch SIGSEGV - probably won't work
Modified: toys/rsget.pl/RSGet/Dispatch.pm
==============================================================================
--- toys/rsget.pl/RSGet/Dispatch.pm (original)
+++ toys/rsget.pl/RSGet/Dispatch.pm Mon Dec 20 15:13:03 2010
@@ -326,6 +326,18 @@
$SIG{USR2} = \&soft_restart;
+sub soft_segv
+{
+ warn "* segment violation detected\n";
+ if ( $soft_stop == 0 ) {
+ $soft_stop = 2;
+ warn "* rsget.pl will restart after finishing all current downloads\n";
+ warn "* send SIGUSR2 to restart now\n";
+ RSGet::FileList::update();
+ }
+}
+$SIG{SEGV} = \&soft_segv;
+
sub soft_stop
{
if ( $soft_stop == 1 ) {
More information about the pld-cvs-commit
mailing list