]> git.donarmstrong.com Git - mothur.git/blobdiff - getmetacommunitycommand.cpp
working of get.mimarkspackage and sra command
[mothur.git] / getmetacommunitycommand.cpp
index 047f176fa6be9b1c11108f0e007391dae33040c7..5b86c7420e1e5e2cbe564fd766edb63919388ea3 100644 (file)
@@ -408,18 +408,18 @@ int GetMetaCommunityCommand::createProcesses(vector<SharedRAbundVector*>& thislo
                
                //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
                                process++;
                        }else if (pid == 0){
                 outputNames.clear();
-                               num = processDriver(thislookup, dividedPartitions[process], (outputFileName + toString(getpid())), rels[process], matrix[process], doneFlags, process);
+                               num = processDriver(thislookup, dividedPartitions[process], (outputFileName + m->mothurGetpid(process)), rels[process], matrix[process], doneFlags, process);
                 
                 //pass numSeqs to parent
                                ofstream out;
-                               string tempFile = toString(getpid()) + ".outputNames.temp";
+                               string tempFile = m->mothurGetpid(process) + ".outputNames.temp";
                                m->openOutputFile(tempFile, out);
                 out << num << endl;
                 out << outputNames.size() << endl;