Subversion Repositories DevTools

Rev

Rev 7413 | Rev 7460 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7413 Rev 7423
Line 190... Line 190...
190
$now = $startTime = time();
190
$now = $startTime = time();
191
readConfig();
191
readConfig();
192
Utils::writepid($conf);
192
Utils::writepid($conf);
193
$logger->logmsg("Starting...");
193
$logger->logmsg("Starting...");
194
readStatistics();
194
readStatistics();
195
sighandlers($conf);
195
sighandlers();
196
 
196
 
197
#
197
#
198
#   Main processing loop
198
#   Main processing loop
199
#   Will exit when terminated by parent
199
#   Will exit when terminated by parent
200
#
200
#
Line 2527... Line 2527...
2527
#
2527
#
2528
# Returns         : Nothing
2528
# Returns         : Nothing
2529
#
2529
#
2530
sub sighandlers
2530
sub sighandlers
2531
{
2531
{
2532
    my $conf = shift;
-
 
2533
    my $logger = $conf->{logger};
-
 
2534
 
-
 
2535
    $SIG{TERM} = sub {
2532
    $SIG{TERM} = sub {
2536
        # On shutdown
2533
        # On shutdown
2537
        $logger->logmsg('Received SIGTERM. Shutting down....' );
2534
        $logger->logmsg('Received SIGTERM. Shutting down....' );
2538
        unlink $conf->{'pidfile'} if (-f $conf->{'pidfile'});
2535
        unlink $conf->{'pidfile'} if (-f $conf->{'pidfile'});
2539
        exit 0;
2536
        exit 0;