Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Long download progress report

by gamache (Friar)
on Nov 16, 2007 at 17:19 UTC ( [id://651272] : note . print w/replies, xml ) Need Help??

in reply to Long download progress report

Here is how I would do it:
  • Fork a child to run the SCP (or other file transfer) process and exit.
  • From the parent, loop on the following:
    • Is the child done? If so, set progress = 100% and exit loop.
    • Set progress = current_filesize / full_filesize.
    • Sleep for N seconds.