I have use Net::Ping in a ActiveState PDK 5.10 PerlSvc.exe service. The
program fails after running and processing several thousand computers. I
have tracked the problem down to this statement:

my $ping = $p->ping($host,5);

in this subroutine:

sub PingHost
{
    my $host = shift;
    #my $p = Net::Ping->new("icmp");
    &WriteLog(&LogFileName, "Net::Ping->new FAILED ($host) $!") if ! $p;
    &WriteLog(&LogFileName, "Ping->($host)");

    my $ping = $p->ping($host,5);
    #$p->close();
    &WriteLog(&LogFileName, "Ping result ($ping)");
    return $ping;
}

As you can see, I used to create the $p (ping) object inside the subroutine
but have moved it to the main script as a troubleshooting step. My log file
indicates that the ping method causes the script to terminate as
"Ping->($host)" is written but "Ping result ($ping)" is not when the program
abends.

Can anyone help me determine why ping kills my program? Are there any know
bugs in this module?
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to