Changeset 9adf5e86f48122c081b0557248285f968efd7e52

Show
Ignore:
Timestamp:
06/29/01 04:03:26 (13 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 993787406 +0000
git-parent:

[37cbe43bf668696d2f26324ca62752e777b57d2b]

git-author:
Theo Schlossnagle <jesus@omniti.com> 993787406 +0000
Message:

INODES monitor and setsid/fork support

git-svn-id: https://labs.omniti.com/resmon/trunk@6 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • resmon

    r37cbe43 r9adf5e8  
    11#!/usr/bin/perl 
     2 
     3push @INC, '/opt/resmon'; 
    24 
    35use strict; 
    46use Time::HiRes qw( gettimeofday tv_interval sleep ); 
    5 use vars qw($opt_c $opt_f $list); 
     7use POSIX qw( setsid ); 
     8use vars qw($opt_c $opt_d $opt_f $list); 
    69 
    710require 'getopts.pl'; 
     
    912require 'resmon_code.pl'; 
    1013 
    11 Getopts('c:f:'); 
     14Getopts('c:df:'); 
    1215 
    1316$opt_c ||= 'resmon.conf'; 
     
    1821  set_statusfile($opt_f) if($opt_f); 
    1922} 
    20  
     23unless($opt_d) { 
     24  fork && exit; 
     25  setsid; 
     26
    2127configure(); 
    2228$SIG{'HUP'} = \&configure;