SPUG: Re: FTP Problems

Richard Anderson starfire at zipcon.net
Sat Oct 14 10:09:33 CDT 2000


If you were on Unix, you would fork and exec a child process that starts the
FTP.  The parent would monitor it using kill 0 $pid.  If the child was
taking too long, the parent would kill it with kill SIGTERM $pid and spawn
another child.

Perl's fork function did not work on Windows as of last year, but
ActiveState
has been working on this.  Check their latest release - it may be fixed.

Richard.Anderson at rayCosoft.com
RayCosoft, Professional Services Group
Perl/SQL/Unix software engineering
www.rayCosoft.com
----- Original Message -----
From: <rathmore at bb12.betterbox.net>
To: "Seattle Perl Users Group" <spug-list at pm.org>
Sent: Friday, October 13, 2000 9:44 AM
Subject: SPUG: FTP Problems


> I posted a similar questions to clpm, got a few suggestions but nothing
> that seems to satisfy my real problem. I'm going to post a summary of my
> question hear, hoping that it better explains what I need. And, btw, I'm a
> newbie to Perl, and I'm writting a program to run on NT.
>
> Problem:
> I'm having trouble with Net::FTP in that about 1 out of 5 times that I'm
> FTPing some files, my Perl program hangs. I don't get a time out, it just
> stops in the middle of downloading a file. This is a behind the scenes
> process so no one will be able to monitor it and do anything about it if
> it hangs.
>
> Question:
> Can I write something into the program to monitor the FTP process and if
> it doesn't complete in a given time frame, restart the FTP process? How
> would something like that look?
>
> Thanks!
> Rathmore
>
>
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>   Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
>  For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
>   Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>
>
>



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list