]> git.donarmstrong.com Git - mothur.git/blobdiff - phylodiversitycommand.cpp
changed int to pid_t type in fork(). roughed in get.mimarkscommand.
[mothur.git] / phylodiversitycommand.cpp
index 339649c7dcc814ac409e5b8ec1dfd432b544e43d..9b52fc9d67452d193986d844c0d10b81dac9572d 100644 (file)
@@ -412,7 +412,7 @@ int PhyloDiversityCommand::createProcesses(vector<int>& procIters, Tree* t, map<
                                
                //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
@@ -420,7 +420,7 @@ int PhyloDiversityCommand::createProcesses(vector<int>& procIters, Tree* t, map<
                        }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);