While downloading the Vista Beta 2 iso image today, I found that the servers were amazingly unreliable. I was a bit surprised at this, since Akamai is usually much better about hosting. I set wget to downloading, but still wasn’t getting very far since the connection was getting reset about once a minute. Setting aggressive timeouts also didn’t quite cut it because I still had to wait for it to restart.
Annoyed by this problem, I set out to find something that could download the file with multiple threads so that hopefully at least one thread would be up and downloading at any given time. I found this nifty tool called Prozilla, which lets you download using multiple threads with configurable retries. Unfortunately, it didn’t compile out of the box on Mac OS X, but that wasn’t too hard to fix:
diff -ur prozilla-2.0.4/libprozilla/src/common.h prozilla-macosx/libprozilla/src/common.h
— prozilla-2.0.4/libprozilla/src/common.h 2006-02-08 11:19:54.000000000 -0600
+++ prozilla-macosx/libprozilla/src/common.h 2006-06-08 06:30:28.000000000 -0500
@@ -83,7 +83,7 @@
#include
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined (__APPLE__)
#include
#include
#else
diff -ur prozilla-2.0.4/src/main.cpp prozilla-macosx/src/main.cpp
— prozilla-2.0.4/src/main.cpp 2006-02-08 11:18:58.000000000 -0600
+++ prozilla-macosx/src/main.cpp 2006-06-08 06:32:09.000000000 -0500
@@ -512,7 +512,7 @@
{
free(url_data);
delete(dl_win);
- shutdown();
+ dl_shutdown();
return -1;
}
delete(dl_win);
@@ -520,11 +520,11 @@
}
}
- shutdown();
+ dl_shutdown();
}
-void shutdown(void)
+void dl_shutdown(void)
{
cleanuprt ();
diff -ur prozilla-2.0.4/src/main.h prozilla-macosx/src/main.h
— prozilla-2.0.4/src/main.h 2006-02-08 11:18:59.000000000 -0600
+++ prozilla-macosx/src/main.h 2006-06-08 06:32:25.000000000 -0500
@@ -79,6 +79,6 @@
extern struct runtime rt;
-void shutdown(void);
+void dl_shutdown(void);
#endif
No comments yet.
Sorry, the comment form is closed at this time.