Help for this page

Select Code to Download


  1. or download this
    #!/perl -w
    
    ...
    {
        print "Failed to add service: " . Win32::FormatMessage( Win32::Dae
    +mon::GetLastError() ) . "\n";
    }
    
  2. or download this
    use Win32::Daemon;
    
    ...
         {sleep(1);}
    
    Win32::Daemon::State( SERVICE_RUNNING );
    
  3. or download this
    BEGIN {
        open( STDERR, ">>c:/daemon.err" );
        warn "$0 started ".localtime().$/;
    }
    
  4. or download this
    #!/perl -w
    
    use strict;
    ...
    
        close LOG;
    }