//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
}else if (pid == 0){
driver(t, div, sumDiv, procIters[process], increment, randomLeaf, numSampledList, outCollect, outSum, false);
- string outTemp = outputDir + toString(getpid()) + ".sumDiv.temp";
+ string outTemp = outputDir + m->mothurGetpid(process) + ".sumDiv.temp";
ofstream out;
m->openOutputFile(outTemp, out);