Hi
I need a little help with a parallel download. My code is working as serial, I cannot find the way to fork as parallel...please help...Thank you.
Code:while (!feof (file)) { memset (line,'\0',1000); char *urlPtr = fgets (line,LINE_MAX, file); ++numberOfChildren; int lineLen = strlen(urlPtr); urlPtr[lineLen-1] = '\0'; pid = fork(); if (pid == 0) { /* child process */ execlp("/usr/bin/wget", "wget", urlPtr, NULL); } ....



1Likes
LinkBack URL
About LinkBacks



