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 ) { _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit