#!/usr/bin/perl BEGIN { open(STDERR, '>', 'C:/app_name/err.log' or die $!; select STDERR; $| = 1; # un-necessary, I know print STDERR "hello world\n"; } use lib 'C:/app_name'; use strict; use warnings; use My::App; my $app = My::App->new(cfg => 'C:/app_name/app.cfg') or die "Didn't ge +t past this point\n"; print STDERR "Ok, got here\n"; while ($app->run_ok) { print STDERR "Inside while loop\n"; $app->do_things(); $app->rest_for_a_while(); } print STDERR "finishing up now\n";
When I start the service, the err.log file is created but is 0 bytes. After 5 minutes or so, I stop the service and the following output shows up in the err.log file (hello world and Ok, Got here)
Cheers - L~R
In reply to Re^5: Turn a perl script into a Win32 Service
by Limbic~Region
in thread Turn a perl script into a Win32 Service
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |