#!/usr/bin/perl -w
#
# test-FastCGI-Restart.pl
#
# Developed by Lubomir Host 'rajo' <rajo AT platon.sk>
# Copyright (c) 2004 Platon SDG, http://platon.sk/
# Licensed under terms of GNU General Public License.
# All rights reserved.
#
# Changelog:
# 2004-05-16 - created
#
# $Platon$
use strict;
use lib qw( .. );
use Platon::FastCGI::Restart;
use vars qw (
$restart
);
$restart = Platon::FastCGI::Restart->new({
restart_func => sub { print "RESTART: Restarting...\n"; exec $0, @ARGV; },
use_lock => 'true',
max_restart_interval => 10,
CHECK_USER_MODULES => 'true',
CHECK_SYSTEM_MODULES => 'false',
});
$restart->add_loaded_modules();
print "Started with args " . join(" ", @ARGV) . "\n";
while (1) {
$restart->restart($0);
sleep(1);
}
# vim: ts=4
# vim600: fdm=marker fdl=0 fdc=3
Platon Group <platon@platon.org> http://platon.org/
|