in reply to Need Net::FTP rmdir time out help

Well, if the remote rmdir operation is reliably terminated every time you reconnect to the machine then, you can just check if the directory exists and in that case restart the deletion:
while(1) { my $ftp = Net::FTP->new(...); defined $ftp->mdtm($dir) or last; $ftp->rmdir($dir); sleep 10; }

Replies are listed 'Best First'.
Re^2: Need Net::FTP rmdir time out help
by Todd Chester (Scribe) on Feb 01, 2017 at 08:41 UTC
    Hmmmm. Maybe I open a second connection to the server and check in a loop to see if the directory still exists or is gone. That "should" (watch the weasel word) keep the original connection from terminating.

      Or perhaps run (via rsh) a script to handle the deletes? It could use a semaphore file to indicate it is still running. Your other process could check for the presence of that file at intervals and continue once it has disappeared.

      But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)