Skip to main content.
home | support | download

Back to List Archive

Re: random crashing of spider.pl!?

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Tue Jan 18 2005 - 03:58:54 GMT
On Mon, Jan 17, 2005 at 11:02:58AM -0800, Justin Tang wrote:
> --Basically I made a function that would dynamically create the config file
> then I use the `` operator to invoke spider.pl with the newly created config
> file, and the function dies after the invocation while spider.pl continues
> to run.

You can dynamically configure the spider right in the spider's config
file.  Just build the @servers array from your database or whatever
you need.


I saw your post on the LWP list.  If you are seeing "Alarm clock" then
you are getting an alarm without trapping the signal.

Try this modification to spider.pl:

        system("stty echo");
        print STDERR "\n";  # because we disabled echo
        chomp($password);

        alarm( 0 ) unless $^O =~ /Win32/i;
    };

    # Add this line below:
    alarm( 0 ) unless $^O =~ /Win32/i;

    return if $@;

That second alarm( 0 ) should be outside that eval block.



-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Mon Jan 17 19:58:54 2005