Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, March 29, 2024

File: [Platon] / perl-modules / test / test-FastCGI-Restart.pl (download)

Revision 1.1, Sun May 16 15:18:43 2004 UTC (19 years, 10 months ago) by rajo

Testing program for Platon::FastCGI::Restart.pm module.

#!/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/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top