--- googlecode.com/svn/trunk/meteord 2006/11/20 18:05:33 5 +++ googlecode.com/svn/trunk/meteord 2008/02/04 21:06:42 47 @@ -6,6 +6,11 @@ # # The Meteor daemon # +# Main program should call Meteor::Config::setCommandLineParameters(@ARGV),. +# Afterwards anybody can access $::CONF{}, where +# is any valid parameter (except 'Help') listed in the +# @DEFAULTS array below. +# ############################################################################### # # This program is free software; you can redistribute it and/or modify it @@ -26,6 +31,12 @@ # ############################################################################### +############################################################################### +# meterod version +################################################################################ + + $::VERSION='1.05.04'; + $::RELEASE_DATE='not yet released'; ############################################################################### # Configuration @@ -58,6 +69,12 @@ ############################################################################### # + # Record startup time + # + $::STARTUP_TIME=time; + $::STARTUP_TIME+=0; # avoid warning + + # # Program name # $::PGM=$0; @@ -85,7 +102,9 @@ { $0="$::PGM daemon"; - unless($::CONF{'Debug'}) + my $facility=$::CONF{'SyslogFacility'} || $Meteor::Syslog::DEFAULT_FACILITY; + + unless($::CONF{'Debug'} || $facility eq 'none') { # close standard file descriptors close(STDIN); @@ -108,7 +127,7 @@ } else { - print "$::PGM PID: $$\n"; + &::syslog('info',"PID\t%s",$$); } } @@ -162,11 +181,11 @@ my $rVec=$serverVector; my $wVec=''; my $eVec=''; - + my $rout; my $wout; my $eout; - + Meteor::Connection->addAllHandleBits(\$rVec,\$wVec,\$eVec); my $timeout=$MAIN_LOOP_TIMEOUT;