NAME

Utils - A general set of perl functions to be included

SYNOPSIS

use Utils;

DESCRIPTION

Utils is used for aquiring locks, date functions and error reporting.

Following are a set of utility functions that are used often in the genloader code. Each function or set of functions is described below.

It is used by the examples OK!

  Variables Defined and exported are:

       $Program_Name  = the basename of the program running
       $Command       = the complete command use to run proggy
 Subroutine getlock 
      
       Args: $file to use as lock file

       Rtns: true/false
  create a lock file for application synchronisation in an atomic
  manner.
 Subroutine read_config_file
       
       Args: config file to read in

       Rtns: nothing but sets variables in the Settings:: package

 Description:
       Read in the config file and set all the variables into the
       Settings:: package.
       
       An example config file is:
              $hosts = ['x', 'a', 'b' ];
       
 Subroutine  forkit

       Args: none

       Rtns: none

 Description: forks into daemon mode or dies on error.
 Subroutine  clone

       Args: none

       Rtns: none

 Description: forks and execs another child process that looks just
 like us :-). Parent isn't affected
 Subroutine  log

       Args: the message to print

       Rtns: none

 Description: prints a formatted response to stdout with time stamp
 added. This could easily be extended to other things

AUTHOR

Mark Pfeiffer <markpf@mlp-consulting.com.au>

COPYRIGHT

Copyright (c) 2003 Mark Pfeiffer. All rights reserved.
This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.